//
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
{
[DbContext(typeof(DefaultDbContext))]
[Migration("20250815025724_UpdateUser0815")]
partial class UpdateUser0815
{
///
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.Department", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("EnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("IsDisabled")
.HasColumnType("bit");
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("ParentId")
.HasColumnType("uniqueidentifier");
b.Property("Path")
.HasColumnType("nvarchar(max)");
b.Property("Remark")
.HasColumnType("nvarchar(max)");
b.Property("Sort")
.HasColumnType("int");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("EnterpriseId");
b.HasIndex("ParentId");
b.ToTable("Department");
});
modelBuilder.Entity("FlexJobApi.Core.DictionaryCategory", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Code")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("FieldNames")
.HasColumnType("nvarchar(max)");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property("Remark")
.HasColumnType("nvarchar(max)");
b.Property("Sort")
.HasColumnType("int");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("DictionaryCategory");
});
modelBuilder.Entity("FlexJobApi.Core.DictionaryData", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CategoryId")
.HasColumnType("uniqueidentifier");
b.Property("Code")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property("Content")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("Deep")
.HasColumnType("int");
b.Property("Field1")
.HasColumnType("nvarchar(max)");
b.Property("Field2")
.HasColumnType("nvarchar(max)");
b.Property("Field3")
.HasColumnType("nvarchar(max)");
b.Property("Field4")
.HasColumnType("nvarchar(max)");
b.Property("Field5")
.HasColumnType("nvarchar(max)");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("IsDisabled")
.HasColumnType("bit");
b.Property("ParentId")
.HasColumnType("uniqueidentifier");
b.Property("Path")
.HasColumnType("nvarchar(max)");
b.Property("Sort")
.HasColumnType("int");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("CategoryId");
b.HasIndex("Code")
.IsUnique();
b.HasIndex("ParentId");
b.ToTable("DictionaryData");
});
modelBuilder.Entity("FlexJobApi.Core.Enterprise", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Address")
.HasColumnType("nvarchar(max)");
b.Property("BankBranchName")
.HasColumnType("nvarchar(max)");
b.Property("BankCard")
.HasMaxLength(32)
.HasColumnType("nvarchar(32)");
b.Property("BankName")
.HasColumnType("nvarchar(max)");
b.Property("CityCode")
.HasColumnType("nvarchar(128)");
b.Property("ContactEmail")
.HasColumnType("nvarchar(max)");
b.Property("ContactPhoneNumber")
.HasMaxLength(11)
.HasColumnType("nvarchar(11)");
b.Property("Contacts")
.HasMaxLength(32)
.HasColumnType("nvarchar(32)");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("EnterpriseName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property("EnterpriseType")
.HasColumnType("nvarchar(max)");
b.Property("EstablishmentDate")
.HasColumnType("nvarchar(max)");
b.Property("IndustryTypeCode")
.HasColumnType("nvarchar(128)");
b.Property("IsCheckedBankCard")
.HasColumnType("bit");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("IsReal")
.HasColumnType("bit");
b.Property("LegalIdentity")
.HasMaxLength(18)
.HasColumnType("nvarchar(18)");
b.Property("LegalPerson")
.HasMaxLength(32)
.HasColumnType("nvarchar(32)");
b.Property("LicenseImage")
.HasColumnType("nvarchar(max)");
b.Property("MainBusiness")
.HasColumnType("nvarchar(max)");
b.Property("MergeSignCost")
.HasColumnType("decimal(18,2)");
b.Property("PayAccess")
.HasColumnType("int");
b.Property("ProvinceCode")
.HasColumnType("nvarchar(128)");
b.Property("RealAccess")
.HasColumnType("int");
b.Property("RealVerifyCost")
.HasColumnType("decimal(18,2)");
b.Property("RegisteredCapital")
.HasColumnType("nvarchar(max)");
b.Property("SignCost")
.HasColumnType("decimal(18,2)");
b.Property("SmsAccess")
.HasColumnType("int");
b.Property("SmsCost")
.HasColumnType("decimal(18,2)");
b.Property("SocietyCreditCode")
.IsRequired()
.HasMaxLength(18)
.HasColumnType("nvarchar(18)");
b.Property("Sort")
.HasColumnType("int");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("CityCode");
b.HasIndex("IndustryTypeCode");
b.HasIndex("ProvinceCode");
b.ToTable("Enterprise");
});
modelBuilder.Entity("FlexJobApi.Core.EnterpriseAuth", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("BankCard")
.HasMaxLength(32)
.HasColumnType("nvarchar(32)");
b.Property("BankCardImg")
.HasColumnType("nvarchar(max)");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("EnterpriseName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property("EnterpriseRealMethod")
.HasColumnType("int");
b.Property("Identity")
.HasMaxLength(18)
.HasColumnType("nvarchar(18)");
b.Property("IdentityBackImg")
.HasColumnType("nvarchar(max)");
b.Property("IdentityImg")
.HasColumnType("nvarchar(max)");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("LegalIdentity")
.HasMaxLength(18)
.HasColumnType("nvarchar(18)");
b.Property("LegalPerson")
.HasMaxLength(32)
.HasColumnType("nvarchar(32)");
b.Property("LicenseImage")
.HasColumnType("nvarchar(max)");
b.Property("Name")
.HasMaxLength(32)
.HasColumnType("nvarchar(32)");
b.Property("PersonalRealMethod")
.HasColumnType("int");
b.Property("PhoneNumber")
.HasMaxLength(11)
.HasColumnType("nvarchar(11)");
b.Property("Proxy")
.HasColumnType("bit");
b.Property("ProxyPowerAttorneyUrl")
.HasColumnType("nvarchar(max)");
b.Property("SocietyCreditCode")
.IsRequired()
.HasMaxLength(18)
.HasColumnType("nvarchar(18)");
b.Property("Sort")
.HasColumnType("int");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("EnterpriseAuth");
});
modelBuilder.Entity("FlexJobApi.Core.EnterpriseEmployee", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Age")
.HasColumnType("int");
b.Property("Birthday")
.HasColumnType("datetime2");
b.Property("ContactPhoneNumber")
.HasMaxLength(11)
.HasColumnType("nvarchar(11)");
b.Property("ContractUrl")
.HasColumnType("nvarchar(max)");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("EnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("EnterpriseSignContractStatus")
.HasColumnType("int");
b.Property("EnterpriseSignContractTime")
.HasColumnType("datetime2");
b.Property("Gender")
.HasColumnType("int");
b.Property("Identity")
.HasColumnType("nvarchar(max)");
b.Property("IdentityBackImg")
.HasColumnType("nvarchar(max)");
b.Property("IdentityImg")
.HasColumnType("nvarchar(max)");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("Name")
.HasMaxLength(32)
.HasColumnType("nvarchar(32)");
b.Property("Sort")
.HasColumnType("int");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("UserId")
.HasColumnType("uniqueidentifier");
b.Property("UserSignContractStatus")
.HasColumnType("int");
b.Property("UserSignContractTime")
.HasColumnType("datetime2");
b.HasKey("Id");
b.HasIndex("EnterpriseId");
b.HasIndex("UserId");
b.ToTable("EnterpriseEmployee");
});
modelBuilder.Entity("FlexJobApi.Core.EnterpriseUserCollect", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CollectedTime")
.HasColumnType("datetime2");
b.Property("ContactedTime")
.HasColumnType("datetime2");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("EnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("IsCollected")
.HasColumnType("bit");
b.Property("IsContacted")
.HasColumnType("bit");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("Sort")
.HasColumnType("int");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("UserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("EnterpriseId");
b.HasIndex("UserId");
b.ToTable("EnterpriseUserCollect");
});
modelBuilder.Entity("FlexJobApi.Core.Menu", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("ClientType")
.HasColumnType("int");
b.Property("Code")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("Group")
.HasColumnType("nvarchar(max)");
b.Property("Icon")
.HasColumnType("nvarchar(max)");
b.Property("IsCache")
.HasColumnType("bit");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("IsDisabled")
.HasColumnType("bit");
b.Property("Location")
.HasColumnType("nvarchar(max)");
b.Property("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property("ParentId")
.HasColumnType("uniqueidentifier");
b.Property("Path")
.HasColumnType("nvarchar(max)");
b.Property("Remark")
.HasColumnType("nvarchar(max)");
b.Property("Sort")
.HasColumnType("int");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("Type")
.HasColumnType("int");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("Url")
.HasColumnType("nvarchar(max)");
b.Property("UserType")
.HasColumnType("int");
b.Property("VisitLevel")
.HasColumnType("int");
b.Property("Width")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("ParentId");
b.ToTable("Menu");
});
modelBuilder.Entity("FlexJobApi.Core.Resource", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("ActionName")
.HasColumnType("nvarchar(max)");
b.Property("ActionSummary")
.HasColumnType("nvarchar(max)");
b.Property("AllowAnonymous")
.HasColumnType("bit");
b.Property("ApplicationName")
.HasColumnType("nvarchar(max)");
b.Property("Code")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Controller")
.HasColumnType("int");
b.Property("ControllerSummary")
.HasColumnType("nvarchar(max)");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("DynamicAssemblyName")
.HasColumnType("nvarchar(max)");
b.Property("FileUpload")
.HasColumnType("bit");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("IsExpired")
.HasColumnType("bit");
b.Property("Method")
.HasColumnType("int");
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("RequestTypeFullName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("RequestTypeName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("ResponseTypeFullName")
.HasColumnType("nvarchar(max)");
b.Property("ResponseTypeName")
.HasColumnType("nvarchar(max)");
b.Property("Route")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("RouteArea")
.HasColumnType("nvarchar(max)");
b.Property("Service")
.HasColumnType("int");
b.Property("ServiceName")
.HasColumnType("nvarchar(max)");
b.Property("Sort")
.HasColumnType("int");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("Resource");
});
modelBuilder.Entity("FlexJobApi.Core.Role", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("ClientType")
.HasColumnType("int");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("DataPower")
.HasColumnType("int");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("IsDisabled")
.HasColumnType("bit");
b.Property("MinLevel")
.HasColumnType("int");
b.Property("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property("Remark")
.HasColumnType("nvarchar(max)");
b.Property("Sort")
.HasColumnType("int");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("UserType")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("Role");
});
modelBuilder.Entity("FlexJobApi.Core.RoleMenu", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("MenuId")
.HasColumnType("uniqueidentifier");
b.Property("RoleId")
.HasColumnType("uniqueidentifier");
b.Property("Sort")
.HasColumnType("int");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("MenuId");
b.HasIndex("RoleId");
b.ToTable("RoleMenu");
});
modelBuilder.Entity("FlexJobApi.Core.RoleResource", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("DataPower")
.HasColumnType("int");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("ResourceId")
.HasColumnType("uniqueidentifier");
b.Property("RoleId")
.HasColumnType("uniqueidentifier");
b.Property("Sort")
.HasColumnType("int");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("ResourceId");
b.HasIndex("RoleId");
b.ToTable("RoleResource");
});
modelBuilder.Entity("FlexJobApi.Core.ScheduleJobDetail", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("AssemblyName")
.HasColumnType("nvarchar(max)");
b.Property("Concurrent")
.HasColumnType("bit");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("Description")
.HasColumnType("nvarchar(max)");
b.Property("GroupName")
.HasColumnType("nvarchar(max)");
b.Property("IncludeAnnotations")
.HasColumnType("bit");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("JobId")
.HasColumnType("nvarchar(max)");
b.Property