- 将播放器收敛为单个共享实例,避免列表/网格内多个 video ref 导致进度保存失效 - 恢复视频播放器上方的继续播放提示 - 在播放、暂停、拖动、结束、切换页面和离开页面时保存播放位置 - 保留文件浏览分页和排序参数的前端调用
468 lines
18 KiB
C#
468 lines
18 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using FileShare_EFCore.Database;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace FileShare_EFCore.Migrations.SqlServer
|
|
{
|
|
[DbContext(typeof(SqlServerAppDataContext))]
|
|
partial class SqlServerAppDataContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "10.0.7")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("FileShare_EFCore.Models.ApiRefreshTokenEntity", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("id");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnName("created-at");
|
|
|
|
b.Property<string>("Device")
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)")
|
|
.HasColumnName("device");
|
|
|
|
b.Property<DateTime>("ExpiresAt")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnName("expires-at");
|
|
|
|
b.Property<string>("IpAddress")
|
|
.HasMaxLength(64)
|
|
.HasColumnType("nvarchar(64)")
|
|
.HasColumnName("ip-address");
|
|
|
|
b.Property<string>("ReplacedByTokenHash")
|
|
.HasMaxLength(128)
|
|
.HasColumnType("nvarchar(128)")
|
|
.HasColumnName("replaced-by-token-hash");
|
|
|
|
b.Property<DateTime?>("RevokedAt")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnName("revoked-at");
|
|
|
|
b.Property<string>("TokenHash")
|
|
.IsRequired()
|
|
.HasMaxLength(128)
|
|
.HasColumnType("nvarchar(128)")
|
|
.HasColumnName("token-hash");
|
|
|
|
b.Property<int>("UserId")
|
|
.HasColumnType("int")
|
|
.HasColumnName("user-id");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk-api-refresh-token");
|
|
|
|
b.HasIndex("TokenHash")
|
|
.IsUnique()
|
|
.HasDatabaseName("idx-api-refresh-token-hash");
|
|
|
|
b.HasIndex("UserId")
|
|
.HasDatabaseName("idx-api-refresh-token-user-id");
|
|
|
|
b.ToTable("api-refresh-token", t =>
|
|
{
|
|
t.HasComment("API refresh token");
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("FileShare_EFCore.Models.ManagedFileRecord", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int")
|
|
.HasColumnName("id");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("AbsolutePath")
|
|
.IsRequired()
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("nvarchar(2048)")
|
|
.HasColumnName("absolute-path");
|
|
|
|
b.Property<string>("ContentType")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("nvarchar(100)")
|
|
.HasColumnName("content-type");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnName("created-at");
|
|
|
|
b.Property<bool>("Exists")
|
|
.HasColumnType("bit")
|
|
.HasColumnName("exists");
|
|
|
|
b.Property<string>("Extension")
|
|
.IsRequired()
|
|
.HasMaxLength(32)
|
|
.HasColumnType("nvarchar(32)")
|
|
.HasColumnName("extension");
|
|
|
|
b.Property<DateTime?>("FileCreationTimeUtc")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnName("file-creation-time-utc");
|
|
|
|
b.Property<string>("FileName")
|
|
.IsRequired()
|
|
.HasMaxLength(260)
|
|
.HasColumnType("nvarchar(260)")
|
|
.HasColumnName("file-name");
|
|
|
|
b.Property<DateTime?>("LastPlayedAt")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnName("last-played-at");
|
|
|
|
b.Property<DateTime>("LastSeenAt")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnName("last-seen-at");
|
|
|
|
b.Property<DateTime>("LastWriteTimeUtc")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnName("last-write-time-utc");
|
|
|
|
b.Property<int>("LibraryRootId")
|
|
.HasColumnType("int")
|
|
.HasColumnName("library-root-id");
|
|
|
|
b.Property<string>("MediaType")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("nvarchar(20)")
|
|
.HasColumnName("media-type");
|
|
|
|
b.Property<double?>("PlaybackPosition")
|
|
.HasColumnType("float")
|
|
.HasColumnName("playback-position");
|
|
|
|
b.Property<string>("RelativePath")
|
|
.IsRequired()
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("nvarchar(1024)")
|
|
.HasColumnName("relative-path");
|
|
|
|
b.Property<long>("SizeBytes")
|
|
.HasColumnType("bigint")
|
|
.HasColumnName("size-bytes");
|
|
|
|
b.Property<int?>("ThumbnailId")
|
|
.HasColumnType("int")
|
|
.HasColumnName("thumbnail-id");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnName("updated-at");
|
|
|
|
b.Property<double?>("VideoDuration")
|
|
.HasColumnType("float")
|
|
.HasColumnName("video-duration");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk-managed-file-record");
|
|
|
|
b.HasIndex("AbsolutePath")
|
|
.IsUnique()
|
|
.HasDatabaseName("idx-managed-file-record-absolute-path");
|
|
|
|
b.HasIndex("FileCreationTimeUtc")
|
|
.HasDatabaseName("idx-managed-file-record-file-creation-time");
|
|
|
|
b.HasIndex("LastPlayedAt")
|
|
.HasDatabaseName("idx-managed-file-record-last-played-at");
|
|
|
|
b.HasIndex("LibraryRootId")
|
|
.HasDatabaseName("idx-managed-file-record-root-id");
|
|
|
|
b.HasIndex("ThumbnailId")
|
|
.HasDatabaseName("idx-managed-file-record-thumbnail-id");
|
|
|
|
b.HasIndex("MediaType", "Exists")
|
|
.HasDatabaseName("idx-managed-file-record-media-type-exists");
|
|
|
|
b.ToTable("managed-file-record", t =>
|
|
{
|
|
t.HasComment("文件库文件记录");
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("FileShare_EFCore.Models.ManagedLibraryRoot", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int")
|
|
.HasColumnName("id");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnName("created-at");
|
|
|
|
b.Property<string>("DisplayName")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)")
|
|
.HasColumnName("display-name");
|
|
|
|
b.Property<bool>("IsAvailable")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bit")
|
|
.HasDefaultValue(true)
|
|
.HasColumnName("is-available");
|
|
|
|
b.Property<bool>("IsEnabled")
|
|
.HasColumnType("bit")
|
|
.HasColumnName("is-enabled");
|
|
|
|
b.Property<DateTime?>("LastScanCompletedAt")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnName("last-scan-completed-at");
|
|
|
|
b.Property<string>("LastScanError")
|
|
.HasMaxLength(2000)
|
|
.HasColumnType("nvarchar(2000)")
|
|
.HasColumnName("last-scan-error");
|
|
|
|
b.Property<DateTime?>("LastScanStartedAt")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnName("last-scan-started-at");
|
|
|
|
b.Property<string>("Path")
|
|
.IsRequired()
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("nvarchar(1024)")
|
|
.HasColumnName("path");
|
|
|
|
b.Property<int>("ScanIntervalMinutes")
|
|
.HasColumnType("int")
|
|
.HasColumnName("scan-interval-minutes");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnName("updated-at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk-managed-library-root");
|
|
|
|
b.HasIndex("Path")
|
|
.IsUnique()
|
|
.HasDatabaseName("idx-managed-library-root-path");
|
|
|
|
b.ToTable("managed-library-root", t =>
|
|
{
|
|
t.HasComment("文件库根目录");
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("FileShare_EFCore.Models.ManagedThumbnailMap", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int")
|
|
.HasColumnName("id");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("ContentType")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("nvarchar(100)")
|
|
.HasColumnName("content-type");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnName("created-at");
|
|
|
|
b.Property<int>("LibraryRootId")
|
|
.HasColumnType("int")
|
|
.HasColumnName("library-root-id");
|
|
|
|
b.Property<string>("RelativePath")
|
|
.IsRequired()
|
|
.HasMaxLength(1024)
|
|
.HasColumnType("nvarchar(1024)")
|
|
.HasColumnName("relative-path");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnName("updated-at");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk-managed-thumbnail-map");
|
|
|
|
b.HasIndex("LibraryRootId")
|
|
.HasDatabaseName("idx-managed-thumbnail-map-root-id");
|
|
|
|
b.HasIndex("RelativePath")
|
|
.IsUnique()
|
|
.HasDatabaseName("idx-managed-thumbnail-map-relative-path");
|
|
|
|
b.ToTable("managed-thumbnail-map", t =>
|
|
{
|
|
t.HasComment("文件缩略图映射记录");
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("FileShare_EFCore.Models.UserEntity", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int")
|
|
.HasColumnName("id")
|
|
.HasComment("用户主键");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnName("created-at")
|
|
.HasComment("创建时间");
|
|
|
|
b.Property<string>("Email")
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)")
|
|
.HasColumnName("email")
|
|
.HasComment("用户邮箱");
|
|
|
|
b.Property<string>("Name")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("nvarchar(100)")
|
|
.HasColumnName("name")
|
|
.HasComment("用户名称");
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)")
|
|
.HasColumnName("password-hash")
|
|
.HasComment("密码哈希值");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("nvarchar(50)")
|
|
.HasColumnName("phone-number")
|
|
.HasComment("电话号码");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnName("updated-at")
|
|
.HasComment("更新时间");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk-user");
|
|
|
|
b.ToTable("user", t =>
|
|
{
|
|
t.HasComment("用户实体,演示数据库 CRUD 操作");
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("FileShare_EFCore.Models.WeatherForecastEntity", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int")
|
|
.HasColumnName("id")
|
|
.HasComment("天气预报主键");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnName("created-at")
|
|
.HasComment("创建时间");
|
|
|
|
b.Property<DateOnly>("Date")
|
|
.HasColumnType("date")
|
|
.HasColumnName("date")
|
|
.HasComment("预报日期");
|
|
|
|
b.Property<string>("Summary")
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)")
|
|
.HasColumnName("summary")
|
|
.HasComment("天气摘要");
|
|
|
|
b.Property<int>("TemperatureC")
|
|
.HasColumnType("int")
|
|
.HasColumnName("temperature-c")
|
|
.HasComment("摄氏温度");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("datetime2")
|
|
.HasColumnName("updated-at")
|
|
.HasComment("更新时间");
|
|
|
|
b.HasKey("Id")
|
|
.HasName("pk-weather-forecast");
|
|
|
|
b.ToTable("weather-forecast", t =>
|
|
{
|
|
t.HasComment("天气预报数据实体");
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("FileShare_EFCore.Models.ManagedFileRecord", b =>
|
|
{
|
|
b.HasOne("FileShare_EFCore.Models.ManagedLibraryRoot", "LibraryRoot")
|
|
.WithMany("Files")
|
|
.HasForeignKey("LibraryRootId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("FileShare_EFCore.Models.ManagedThumbnailMap", "Thumbnail")
|
|
.WithMany("Files")
|
|
.HasForeignKey("ThumbnailId")
|
|
.OnDelete(DeleteBehavior.SetNull);
|
|
|
|
b.Navigation("LibraryRoot");
|
|
|
|
b.Navigation("Thumbnail");
|
|
});
|
|
|
|
modelBuilder.Entity("FileShare_EFCore.Models.ManagedThumbnailMap", b =>
|
|
{
|
|
b.HasOne("FileShare_EFCore.Models.ManagedLibraryRoot", "LibraryRoot")
|
|
.WithMany("Thumbnails")
|
|
.HasForeignKey("LibraryRootId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("LibraryRoot");
|
|
});
|
|
|
|
modelBuilder.Entity("FileShare_EFCore.Models.ManagedLibraryRoot", b =>
|
|
{
|
|
b.Navigation("Files");
|
|
|
|
b.Navigation("Thumbnails");
|
|
});
|
|
|
|
modelBuilder.Entity("FileShare_EFCore.Models.ManagedThumbnailMap", b =>
|
|
{
|
|
b.Navigation("Files");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|