//
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("20250905071059_UpdateEnterpriseWallet0905005")]
partial class UpdateEnterpriseWallet0905005
{
///
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.CodeUrl", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Code")
.HasColumnType("nvarchar(max)");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("ExpiredTime")
.HasColumnType("datetime2");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("Scene")
.HasColumnType("int");
b.Property("Sort")
.HasColumnType("int");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("Url")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("CodeUrl");
});
modelBuilder.Entity("FlexJobApi.Core.ContractTemplate", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Access")
.HasColumnType("int");
b.Property("Code")
.HasMaxLength(32)
.HasColumnType("nvarchar(32)");
b.Property("CompletedTime")
.HasColumnType("datetime2");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("ElectronSignContractTemplateId")
.HasColumnType("uniqueidentifier");
b.Property("EnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("File")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("IsDisabled")
.HasColumnType("bit");
b.Property("Name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property("Sort")
.HasColumnType("int");
b.Property("Status")
.HasColumnType("int");
b.Property("TemplateEditData")
.HasColumnType("nvarchar(max)");
b.Property("TemplateId")
.HasColumnType("nvarchar(max)");
b.Property("TemplateJsonData")
.HasColumnType("nvarchar(max)");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("WxmpQrCode")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("EnterpriseId");
b.ToTable("ContractTemplate");
});
modelBuilder.Entity("FlexJobApi.Core.ContractTemplateValue", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("BindProperty")
.HasColumnType("nvarchar(max)");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("Label")
.HasColumnType("nvarchar(max)");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("Recorder")
.HasColumnType("int");
b.Property("Required")
.HasColumnType("bit");
b.Property("Sort")
.HasColumnType("int");
b.Property("TemplateId")
.HasColumnType("uniqueidentifier");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("Type")
.HasColumnType("int");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("UserType")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("TemplateId");
b.ToTable("ContractTemplateValue");
});
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.ElectronSignSetting", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Access")
.HasColumnType("int");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("IsDisabled")
.HasColumnType("bit");
b.Property("MergeSignCost")
.HasColumnType("decimal(18,2)");
b.Property("RealVerifyCost")
.HasColumnType("decimal(18,2)");
b.Property("SignCost")
.HasColumnType("decimal(18,2)");
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("ElectronSignSetting");
});
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("IndustrialParkId")
.HasColumnType("uniqueidentifier");
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("PayAccess")
.HasColumnType("int");
b.Property("ProvinceCode")
.HasColumnType("nvarchar(128)");
b.Property("RealAccess")
.HasColumnType("int");
b.Property("RegisteredCapital")
.HasColumnType("nvarchar(max)");
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("CertAccount")
.HasColumnType("nvarchar(max)");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("ElectronSignEnterpriseId")
.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.EnterpriseCost", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Amount")
.HasColumnType("decimal(18,2)");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("EnterpriseEmployeeContractId")
.HasColumnType("uniqueidentifier");
b.Property("EnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("Sort")
.HasColumnType("int");
b.Property("Status")
.HasColumnType("int");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("Type")
.HasColumnType("int");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("EnterpriseEmployeeContractId");
b.HasIndex("EnterpriseId");
b.ToTable("EnterpriseCost");
});
modelBuilder.Entity("FlexJobApi.Core.EnterpriseElectronSignSetting", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("ElectronSignAccess")
.HasColumnType("int");
b.Property("EnterpriseId")
.HasColumnType("uniqueidentifier");
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.HasKey("Id");
b.HasIndex("EnterpriseId");
b.ToTable("EnterpriseElectronSignSetting");
});
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("ContractCode")
.HasColumnType("nvarchar(max)");
b.Property("ContractTemplateId")
.HasColumnType("uniqueidentifier");
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("EnterpriseSignContractErrorMessage")
.HasColumnType("nvarchar(max)");
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("UserSignContractErrorMessage")
.HasColumnType("nvarchar(max)");
b.Property("UserSignContractStatus")
.HasColumnType("int");
b.Property("UserSignContractTime")
.HasColumnType("datetime2");
b.HasKey("Id");
b.HasIndex("ContractTemplateId");
b.HasIndex("EnterpriseId");
b.HasIndex("UserId");
b.ToTable("EnterpriseEmployee");
});
modelBuilder.Entity("FlexJobApi.Core.EnterpriseEmployeeContract", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("ContractCode")
.HasColumnType("nvarchar(max)");
b.Property("ContractTemplateId")
.HasColumnType("uniqueidentifier");
b.Property("ContractUrl")
.HasColumnType("nvarchar(max)");
b.Property("CreatedEnterpriseId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("EnterpriseEmployeeId")
.HasColumnType("uniqueidentifier");
b.Property("EnterpriseSignContractErrorMessage")
.HasColumnType("nvarchar(max)");
b.Property("EnterpriseSignContractStatus")
.HasColumnType("int");
b.Property("EnterpriseSignContractTime")
.HasColumnType("datetime2");
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("UserSignContractErrorMessage")
.HasColumnType("nvarchar(max)");
b.Property("UserSignContractStatus")
.HasColumnType("int");
b.Property("UserSignContractTime")
.HasColumnType("datetime2");
b.HasKey("Id");
b.HasIndex("ContractTemplateId");
b.HasIndex("EnterpriseEmployeeId");
b.ToTable("EnterpriseEmployeeContract");
});
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