//
using System;
using MiaoYu.Repository.Admin;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace MiaoYu.Repository.Admin.Migrations
{
[DbContext(typeof(AdminDbContext))]
[Migration("20240716050906_sqlserver_init")]
partial class sqlserver_init
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.ApprovalFlow.Flow", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Code")
.HasColumnType("nvarchar(max)");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("Number")
.HasColumnType("int");
b.Property("Remark")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("flow");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.ApprovalFlow.FlowApproval", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("FlowCode")
.HasColumnType("nvarchar(max)");
b.Property("FlowId")
.HasColumnType("uniqueidentifier");
b.Property("FlowName")
.HasColumnType("nvarchar(max)");
b.Property("FormId")
.HasColumnType("uniqueidentifier");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("LaunchTime")
.HasColumnType("datetime2");
b.Property("UserId")
.HasColumnType("uniqueidentifier");
b.Property("UserName")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("flow_approval");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.ApprovalFlow.FlowApprovalStepHistory", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("ApprovalDate")
.HasColumnType("datetime2");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("FlowNodeId")
.HasColumnType("uniqueidentifier");
b.Property("FlowNodeName")
.HasColumnType("nvarchar(max)");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("Opinions")
.HasColumnType("nvarchar(max)");
b.Property("Sort")
.HasColumnType("int");
b.Property("SortMore")
.HasColumnType("int");
b.Property("State")
.HasColumnType("int");
b.Property("UserId")
.HasColumnType("uniqueidentifier");
b.Property("UserName")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("flow_approval_step_history");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.ApprovalFlow.FlowApprovalStepHistoryUser", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("FlowApprovalStepHistoryId")
.HasColumnType("uniqueidentifier");
b.Property("FlowNodeId")
.HasColumnType("uniqueidentifier");
b.Property("FlowNodeName")
.HasColumnType("nvarchar(max)");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("UserId")
.HasColumnType("uniqueidentifier");
b.Property("UserName")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("flow_approval_step_history_user");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.ApprovalFlow.FlowNode", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("FlowId")
.HasColumnType("uniqueidentifier");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("Remark")
.HasColumnType("nvarchar(max)");
b.Property("RoleId")
.HasColumnType("uniqueidentifier");
b.Property("Sort")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("flow_node");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.Base.Member", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Birthday")
.HasColumnType("datetime2");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("FilePath")
.HasColumnType("nvarchar(max)");
b.Property("Introduce")
.HasColumnType("nvarchar(max)");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("Number")
.HasColumnType("nvarchar(max)");
b.Property("Phone")
.HasColumnType("nvarchar(max)");
b.Property("Photo")
.HasColumnType("nvarchar(max)");
b.Property("Sex")
.HasColumnType("nvarchar(max)");
b.Property("UserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("member");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.LowCode.LowCodeList", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("ForeignKeyTableFieldName")
.HasColumnType("nvarchar(max)");
b.Property("ForeignKeyTableId")
.HasColumnType("uniqueidentifier");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("Low_Code_TableId")
.HasColumnType("uniqueidentifier");
b.Property("Low_Code_Table_InfoId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("low_code_list");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.LowCode.LowCodeSearch", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("Low_Code_TableId")
.HasColumnType("uniqueidentifier");
b.Property("Low_Code_Table_InfoId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("low_code_search");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.LowCode.LowCodeTable", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("ClientIndexPath")
.HasColumnType("nvarchar(max)");
b.Property("ClientInfoPath")
.HasColumnType("nvarchar(max)");
b.Property("ClientServicePath")
.HasColumnType("nvarchar(max)");
b.Property("ControllerPath")
.HasColumnType("nvarchar(max)");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("DisplayName")
.HasColumnType("nvarchar(max)");
b.Property("EntityName")
.HasColumnType("nvarchar(max)");
b.Property("IsCover")
.HasColumnType("bit");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("ModelPath")
.HasColumnType("nvarchar(max)");
b.Property("Remark")
.HasColumnType("nvarchar(max)");
b.Property("Schema")
.HasColumnType("nvarchar(max)");
b.Property("ServicePath")
.HasColumnType("nvarchar(max)");
b.Property("TableName")
.HasColumnType("nvarchar(max)");
b.Property("Type")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("low_code_table");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.LowCode.LowCodeTableInfo", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("ColumnName")
.HasColumnType("nvarchar(max)");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("CsField")
.HasColumnType("nvarchar(max)");
b.Property("CsType")
.HasColumnType("nvarchar(max)");
b.Property("DatabaseColumnType")
.HasColumnType("nvarchar(max)");
b.Property("Describe")
.HasColumnType("nvarchar(max)");
b.Property("DisplayName")
.HasColumnType("nvarchar(max)");
b.Property("IsIdentity")
.HasColumnType("bit");
b.Property("IsNullable")
.HasColumnType("bit");
b.Property("IsPrimary")
.HasColumnType("bit");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("Low_Code_TableId")
.HasColumnType("uniqueidentifier");
b.Property("MaxLength")
.HasColumnType("int");
b.Property("Position")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("low_code_table_info");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.Quartz.QuartzJob", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("Cron")
.HasColumnType("nvarchar(max)");
b.Property("ExecuteTime")
.HasColumnType("datetime2");
b.Property("GroupName")
.HasColumnType("nvarchar(max)");
b.Property("JobPoint")
.HasColumnType("nvarchar(max)");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("Remark")
.HasColumnType("nvarchar(max)");
b.Property("RequestMode")
.HasColumnType("int")
.HasColumnName("RequsetMode");
b.Property("State")
.HasColumnType("bit");
b.Property("Type")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("quartz_job_task");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.Quartz.QuartzJobLog", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("JobId")
.HasColumnType("uniqueidentifier")
.HasColumnName("JobTaskId");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("Text")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("quartz_job_task_log");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.Systems.SysDataAuthority", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("PermissionType")
.HasColumnType("int");
b.Property("RoleId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("sys_data_authority");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.Systems.SysDataAuthorityCustom", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("SysDataAuthorityId")
.HasColumnType("uniqueidentifier");
b.Property("SysOrganizationId")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("sys_data_authority_custom");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.Systems.SysDictionary", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Code")
.HasColumnType("nvarchar(max)");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("ParentId")
.HasColumnType("int");
b.Property("Sort")
.HasColumnType("int");
b.Property("Value")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("sys_dictionary");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.Systems.SysFunction", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("ByName")
.HasColumnType("nvarchar(max)");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("Number")
.HasColumnType("int");
b.Property("Remark")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("sys_function");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.Systems.SysMenu", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("Close")
.HasColumnType("bit");
b.Property("ComponentName")
.HasColumnType("nvarchar(max)");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("Icon")
.HasColumnType("nvarchar(max)");
b.Property("JumpUrl")
.HasColumnType("nvarchar(max)");
b.Property("KeepAlive")
.HasColumnType("bit");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("LevelCode")
.HasColumnType("nvarchar(max)");
b.Property("Mode")
.HasColumnType("int");
b.Property("ModuleUrl")
.HasColumnType("nvarchar(max)");
b.Property("ModuleUrlPro")
.HasColumnType("nvarchar(max)");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("Number")
.HasColumnType("int");
b.Property("ParentId")
.HasColumnType("int");
b.Property("Router")
.HasColumnType("nvarchar(max)");
b.Property("Show")
.HasColumnType("bit");
b.Property("State")
.HasColumnType("bit");
b.Property("Type")
.HasColumnType("int");
b.Property("Url")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("sys_menu");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.Systems.SysMenuFunction", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("FunctionCode")
.HasColumnType("nvarchar(max)");
b.Property("FunctionName")
.HasColumnType("nvarchar(max)");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("MenuId")
.HasColumnType("int");
b.Property("Number")
.HasColumnType("int");
b.Property("Remark")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("sys_menu_function");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.Systems.SysOperationLog", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("ActionDisplayName")
.HasColumnType("nvarchar(max)");
b.Property("Api")
.HasColumnType("nvarchar(max)");
b.Property("Browser")
.HasColumnType("nvarchar(max)");
b.Property("ControllerDisplayName")
.HasColumnType("nvarchar(max)");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("Form")
.HasColumnType("nvarchar(max)");
b.Property("FormBody")
.HasColumnType("nvarchar(max)");
b.Property("Ip")
.HasColumnType("nvarchar(max)");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("OS")
.HasColumnType("nvarchar(max)");
b.Property("QueryString")
.HasColumnType("nvarchar(max)");
b.Property("TakeUpTime")
.HasColumnType("bigint");
b.Property("UserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("sys_operation_log");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.Systems.SysOrganization", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("Email")
.HasColumnType("nvarchar(max)");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("Leader")
.HasColumnType("nvarchar(max)");
b.Property("LevelCode")
.HasColumnType("nvarchar(max)");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("OrderNumber")
.HasColumnType("int");
b.Property("ParentId")
.HasColumnType("int");
b.Property("Phone")
.HasColumnType("nvarchar(max)");
b.Property("State")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("sys_organization");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.Systems.SysPost", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Code")
.HasColumnType("nvarchar(max)");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property("LastModifierUserId")
.HasColumnType("uniqueidentifier");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("Number")
.HasColumnType("int");
b.Property("Remarks")
.HasColumnType("nvarchar(max)");
b.Property("State")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("sys_post");
});
modelBuilder.Entity("MiaoYu.Repository.Admin.Entities.Systems.SysRole", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreationTime")
.HasColumnType("datetime2");
b.Property("CreatorUserId")
.HasColumnType("uniqueidentifier");
b.Property("DeleteLock")
.HasColumnType("bit");
b.Property("IsAdmin")
.HasColumnType("bit");
b.Property("LastModificationTime")
.HasColumnType("datetime2");
b.Property