// using System; using FlexJobApi.EntityFramework.Core; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace FlexJobApi.Database.Migrations.Migrations.LogDb { [DbContext(typeof(LogDbContext))] [Migration("20250801141950_Init")] partial class Init { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "9.0.7") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("FlexJobApi.Core.ConsoleLog", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Access") .HasColumnType("int") .HasComment("通道"); b.Property("ClientIpAddress") .HasMaxLength(32) .HasColumnType("nvarchar(32)") .HasComment("客户IP地址"); b.Property("Content") .IsRequired() .HasColumnType("nvarchar(max)") .HasComment("内容"); b.Property("CreatedTime") .HasColumnType("datetimeoffset"); b.Property("CreatedUserInfoId") .HasColumnType("uniqueidentifier") .HasComment("创建操作人"); b.Property("IsDeleted") .HasColumnType("bit") .HasComment("是否删除"); b.Property("Level") .HasColumnType("int") .HasComment("级别"); b.Property("Sort") .HasColumnType("int") .HasComment("排序"); b.Property("StackTrace") .HasColumnType("nvarchar(max)") .HasComment("堆栈跟踪"); b.Property("TraceId") .HasColumnType("nvarchar(max)") .HasComment("跟踪Id"); b.Property("UpdateUserInfoId") .HasColumnType("uniqueidentifier") .HasComment("最后更新操作人"); b.Property("UpdatedTime") .HasColumnType("datetimeoffset"); b.Property("Url") .HasColumnType("nvarchar(max)") .HasComment("链接地址"); b.HasKey("Id"); b.ToTable("ConsoleLog", t => { t.HasComment("控制台日志"); }); }); modelBuilder.Entity("FlexJobApi.Core.DbAuditLog", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("CreatedTime") .HasColumnType("datetimeoffset"); b.Property("CreatedUserInfoId") .HasColumnType("uniqueidentifier") .HasComment("创建操作人"); b.Property("IsDeleted") .HasColumnType("bit") .HasComment("是否删除"); b.Property("NewValues") .HasColumnType("nvarchar(max)") .HasComment("新值"); b.Property("OldValues") .HasColumnType("nvarchar(max)") .HasComment("旧值"); b.Property("Operate") .HasColumnType("int") .HasComment("操作"); b.Property("PrimaryKey") .HasColumnType("uniqueidentifier") .HasComment("主键"); b.Property("Sort") .HasColumnType("int") .HasComment("排序"); b.Property("TableName") .IsRequired() .HasMaxLength(128) .HasColumnType("nvarchar(128)") .HasComment("表名"); b.Property("TraceId") .HasColumnType("nvarchar(max)") .HasComment("跟踪Id"); b.Property("UpdateUserInfoId") .HasColumnType("uniqueidentifier") .HasComment("最后更新操作人"); b.Property("UpdatedTime") .HasColumnType("datetimeoffset"); b.HasKey("Id"); b.ToTable("DbAuditLog", t => { t.HasComment("数据库审计日志"); }); }); modelBuilder.Entity("FlexJobApi.Core.Entities.Common.ResourceLog", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Callback") .HasColumnType("nvarchar(max)"); b.Property("ClientIpAddress") .HasColumnType("nvarchar(max)"); b.Property("CreatedTime") .HasColumnType("datetimeoffset"); b.Property("CreatedUserInfoId") .HasColumnType("uniqueidentifier") .HasComment("创建操作人"); b.Property("ElapsedMilliseconds") .HasColumnType("bigint"); b.Property("Headers") .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") .HasColumnType("bit") .HasComment("是否删除"); b.Property("IsSuccess") .HasColumnType("bit"); b.Property("Method") .IsRequired() .HasMaxLength(6) .HasColumnType("nvarchar(6)"); b.Property("Request") .HasColumnType("nvarchar(max)"); b.Property("Sort") .HasColumnType("int") .HasComment("排序"); b.Property("TraceId") .HasColumnType("nvarchar(max)") .HasComment("跟踪Id"); b.Property("UpdateUserInfoId") .HasColumnType("uniqueidentifier") .HasComment("最后更新操作人"); b.Property("UpdatedTime") .HasColumnType("datetimeoffset"); b.Property("Url") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("ResourceLog"); }); modelBuilder.Entity("FlexJobApi.Core.ExceptionLog", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Code") .HasMaxLength(32) .HasColumnType("nvarchar(32)") .HasComment("代码"); b.Property("CreatedTime") .HasColumnType("datetimeoffset"); b.Property("CreatedUserInfoId") .HasColumnType("uniqueidentifier") .HasComment("创建操作人"); b.Property("IsDeleted") .HasColumnType("bit") .HasComment("是否删除"); b.Property("Message") .HasColumnType("nvarchar(max)") .HasComment("消息"); b.Property("Sort") .HasColumnType("int") .HasComment("排序"); b.Property("StackTrace") .HasColumnType("nvarchar(max)") .HasComment("堆栈跟踪"); b.Property("TraceId") .HasColumnType("nvarchar(max)") .HasComment("跟踪Id"); b.Property("Type") .HasMaxLength(256) .HasColumnType("nvarchar(256)") .HasComment("类型"); b.Property("UpdateUserInfoId") .HasColumnType("uniqueidentifier") .HasComment("最后更新操作人"); b.Property("UpdatedTime") .HasColumnType("datetimeoffset"); b.HasKey("Id"); b.ToTable("ExceptionLog", t => { t.HasComment("异常日志"); }); }); modelBuilder.Entity("FlexJobApi.Core.QueueLog", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Access") .HasColumnType("int") .HasComment("通道"); b.Property("CreatedTime") .HasColumnType("datetimeoffset"); b.Property("CreatedUserInfoId") .HasColumnType("uniqueidentifier") .HasComment("创建操作人"); b.Property("Data") .IsRequired() .HasColumnType("nvarchar(max)") .HasComment("数据"); b.Property("ElapsedMilliseconds") .HasColumnType("bigint") .HasComment("耗时毫秒数"); b.Property("EventId") .IsRequired() .HasMaxLength(128) .HasColumnType("nvarchar(128)") .HasComment("事件Id"); b.Property("IsConsumOnce") .HasColumnType("bit") .HasComment("消息是否只消费一次"); b.Property("IsDeleted") .HasColumnType("bit") .HasComment("是否删除"); b.Property("Sort") .HasColumnType("int") .HasComment("排序"); b.Property("TraceId") .HasColumnType("nvarchar(max)") .HasComment("跟踪Id"); b.Property("UpdateUserInfoId") .HasColumnType("uniqueidentifier") .HasComment("最后更新操作人"); b.Property("UpdatedTime") .HasColumnType("datetimeoffset"); b.HasKey("Id"); b.ToTable("QueueLog", t => { t.HasComment("消息队列日志"); }); }); modelBuilder.Entity("FlexJobApi.Core.SmsLog", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Access") .HasColumnType("int") .HasComment("通道"); b.Property("CreatedTime") .HasColumnType("datetimeoffset"); b.Property("CreatedUserInfoId") .HasColumnType("uniqueidentifier") .HasComment("创建操作人"); b.Property("Expiry") .HasColumnType("datetime2") .HasComment("有效期"); b.Property("IsDeleted") .HasColumnType("bit") .HasComment("是否删除"); b.Property("IsUsed") .HasColumnType("bit") .HasComment("是否使用"); b.Property("PhoneNumber") .IsRequired() .HasMaxLength(11) .HasColumnType("nvarchar(11)") .HasComment("手机号码"); b.Property("Sort") .HasColumnType("int") .HasComment("排序"); b.Property("TemplateCode") .IsRequired() .HasMaxLength(128) .HasColumnType("nvarchar(128)") .HasComment("模板代码"); b.Property("TemplateParam") .HasColumnType("nvarchar(max)") .HasComment("模板参数"); b.Property("TraceId") .HasColumnType("nvarchar(max)") .HasComment("跟踪Id"); b.Property("UpdateUserInfoId") .HasColumnType("uniqueidentifier") .HasComment("最后更新操作人"); b.Property("UpdatedTime") .HasColumnType("datetimeoffset"); b.HasKey("Id"); b.ToTable("SmsLog", t => { t.HasComment("短信日志"); }); }); #pragma warning restore 612, 618 } } }