//
using System;
using ApiTools.EntityFramework.Core;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ApiTools.Database.Migrations.Migrations
{
[DbContext(typeof(DefaultDbContext))]
partial class DefaultDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("ApiTools.Core.Channel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Code")
.HasColumnType("nvarchar(max)");
b.Property("CreatedChannelId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("IsDisabled")
.HasColumnType("bit");
b.Property("Name")
.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("Channel");
});
modelBuilder.Entity("ApiTools.Core.ChannelWallet", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Access")
.HasColumnType("int");
b.Property("Balance")
.HasColumnType("decimal(18,2)");
b.Property("Bank")
.HasColumnType("nvarchar(max)");
b.Property("BankBranch")
.HasColumnType("nvarchar(max)");
b.Property("ChannelId")
.HasColumnType("uniqueidentifier");
b.Property("Code")
.HasColumnType("nvarchar(max)");
b.Property("CreatedChannelId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("ErrorCode")
.HasColumnType("nvarchar(max)");
b.Property("FailReason")
.HasColumnType("nvarchar(max)");
b.Property("Identity")
.HasColumnType("nvarchar(max)");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("Name")
.HasColumnType("nvarchar(max)");
b.Property("OutWalletId")
.HasColumnType("nvarchar(max)");
b.Property("SignStatus")
.HasColumnType("int");
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("ChannelId");
b.ToTable("ChannelWallet");
});
modelBuilder.Entity("ApiTools.Core.ChannelWalletTransaction", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("AfterBalance")
.HasColumnType("decimal(18,2)");
b.Property("Amount")
.HasColumnType("decimal(18,2)");
b.Property("Balance")
.HasColumnType("decimal(18,2)");
b.Property("Code")
.HasColumnType("nvarchar(max)");
b.Property("ConcurrencyLock")
.HasColumnType("nvarchar(450)");
b.Property("CreatedChannelId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("Currency")
.HasColumnType("nvarchar(max)");
b.Property("EreceiptDownloadOssUrl")
.HasColumnType("nvarchar(max)");
b.Property("EreceiptDownloadUrl")
.HasColumnType("nvarchar(max)");
b.Property("EreceiptErrorMessage")
.HasColumnType("nvarchar(max)");
b.Property("EreceiptFileId")
.HasColumnType("nvarchar(max)");
b.Property("EreceiptStatus")
.HasColumnType("int");
b.Property("ErrorCode")
.HasColumnType("nvarchar(max)");
b.Property("FailReason")
.HasColumnType("nvarchar(max)");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("OperatorTime")
.HasColumnType("datetime2");
b.Property("OrderFee")
.HasColumnType("decimal(18,2)");
b.Property("OutCode")
.HasColumnType("nvarchar(max)");
b.Property("OutOperatorId")
.HasColumnType("nvarchar(max)");
b.Property("OutReceiveId")
.HasColumnType("nvarchar(max)");
b.Property("PayerAccount")
.HasColumnType("nvarchar(max)");
b.Property("PayerBank")
.HasColumnType("nvarchar(max)");
b.Property("PayerBankBranch")
.HasColumnType("nvarchar(max)");
b.Property("PayerName")
.HasColumnType("nvarchar(max)");
b.Property("Purpose")
.HasColumnType("nvarchar(max)");
b.Property("ReceiveAccount")
.HasColumnType("nvarchar(max)");
b.Property("ReceiveBank")
.HasColumnType("nvarchar(max)");
b.Property("ReceiveBankBranch")
.HasColumnType("nvarchar(max)");
b.Property("ReceiveIdentity")
.HasColumnType("nvarchar(max)");
b.Property("ReceiveName")
.HasColumnType("nvarchar(max)");
b.Property("Remark")
.HasColumnType("nvarchar(max)");
b.Property("Sort")
.HasColumnType("int");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("TransDate")
.HasColumnType("datetime2");
b.Property("TransactionStatus")
.HasColumnType("int");
b.Property("Type")
.HasColumnType("int");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("WalletId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("ConcurrencyLock")
.IsUnique()
.HasFilter("[ConcurrencyLock] IS NOT NULL");
b.HasIndex("WalletId");
b.ToTable("ChannelWalletTransaction");
});
modelBuilder.Entity("ApiTools.Core.ChannelWalletTransactionPingAnPay", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("AccountDate")
.HasColumnType("nvarchar(max)");
b.Property("BackRem")
.HasColumnType("nvarchar(max)");
b.Property("CreatedChannelId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("CstInnerFlowNo")
.HasColumnType("nvarchar(max)");
b.Property("Fee")
.HasColumnType("nvarchar(max)");
b.Property("FreezeNo")
.HasColumnType("nvarchar(max)");
b.Property("FrontLogNo")
.HasColumnType("nvarchar(max)");
b.Property("HostErrorCode")
.HasColumnType("nvarchar(max)");
b.Property("HostFlowNo")
.HasColumnType("nvarchar(max)");
b.Property("IsBack")
.HasColumnType("nvarchar(max)");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("ProxyPayAcc")
.HasColumnType("nvarchar(max)");
b.Property("ProxyPayBankName")
.HasColumnType("nvarchar(max)");
b.Property("ProxyPayName")
.HasColumnType("nvarchar(max)");
b.Property("RemoveStopFailReason")
.HasColumnType("nvarchar(max)");
b.Property("RemoveStopStt")
.HasColumnType("nvarchar(max)");
b.Property("Sort")
.HasColumnType("int");
b.Property("StopFailReason")
.HasColumnType("nvarchar(max)");
b.Property("StopStt")
.HasColumnType("nvarchar(max)");
b.Property("SubmitTime")
.HasColumnType("nvarchar(max)");
b.Property("SysFlag")
.HasColumnType("nvarchar(max)");
b.Property("ThirdVoucher")
.HasColumnType("nvarchar(max)");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("TransBsn")
.HasColumnType("nvarchar(max)");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("Yhcljg")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("ChannelWalletTransactionPingAnPay");
});
modelBuilder.Entity("ApiTools.Core.Entities.LogRecords.WxmpSubscribMessageLog", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Code")
.HasColumnType("nvarchar(max)");
b.Property("CreatedChannelId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("Data")
.HasColumnType("nvarchar(max)");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("OpenId")
.HasColumnType("nvarchar(max)");
b.Property("Page")
.HasColumnType("nvarchar(max)");
b.Property("PopupScene")
.HasColumnType("nvarchar(max)");
b.Property("Sort")
.HasColumnType("int");
b.Property("SubscribeStatusString")
.HasColumnType("nvarchar(max)");
b.Property("TemplateId")
.HasColumnType("nvarchar(max)");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("WxmpSubscribMessageLog");
});
modelBuilder.Entity("ApiTools.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("ControllerName")
.HasColumnType("nvarchar(max)");
b.Property("ControllerSummary")
.HasColumnType("nvarchar(max)");
b.Property("CreatedChannelId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("CustomResponse")
.HasColumnType("bit");
b.Property("DynamicAssemblyName")
.HasColumnType("nvarchar(max)");
b.Property("FileUpload")
.HasColumnType("bit");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("IsExpired")
.HasColumnType("bit");
b.Property("IsFromForm")
.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("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("ApiTools.Core.ScheduleJobDetail", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("AssemblyName")
.HasColumnType("nvarchar(max)");
b.Property("Concurrent")
.HasColumnType("bit");
b.Property("CreatedChannelId")
.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("JobType")
.HasColumnType("nvarchar(max)");
b.Property("Properties")
.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("ScheduleJobDetail");
});
modelBuilder.Entity("ApiTools.Core.ScheduleJobTrigger", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Args")
.HasColumnType("nvarchar(max)");
b.Property("AssemblyName")
.HasColumnType("nvarchar(max)");
b.Property("CreatedChannelId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("Description")
.HasColumnType("nvarchar(max)");
b.Property("ElapsedTime")
.HasColumnType("bigint");
b.Property("EndTime")
.HasColumnType("datetime2");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("JobId")
.HasColumnType("nvarchar(max)");
b.Property("LastRunTime")
.HasColumnType("datetime2");
b.Property("MaxNumberOfErrors")
.HasColumnType("bigint");
b.Property("MaxNumberOfRuns")
.HasColumnType("bigint");
b.Property("NextRunTime")
.HasColumnType("datetime2");
b.Property("NumRetries")
.HasColumnType("bigint");
b.Property("NumberOfErrors")
.HasColumnType("bigint");
b.Property("NumberOfRuns")
.HasColumnType("bigint");
b.Property("ResetOnlyOnce")
.HasColumnType("bit");
b.Property("Result")
.HasColumnType("nvarchar(max)");
b.Property("RetryTimeout")
.HasColumnType("int");
b.Property("RunOnStart")
.HasColumnType("bit");
b.Property("Sort")
.HasColumnType("int");
b.Property("StartNow")
.HasColumnType("bit");
b.Property("StartTime")
.HasColumnType("datetime2");
b.Property("Status")
.HasColumnType("bigint");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("TriggerId")
.HasColumnType("nvarchar(max)");
b.Property("TriggerType")
.HasColumnType("nvarchar(max)");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("ScheduleJobTrigger");
});
modelBuilder.Entity("ApiTools.Core.SmsLog", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Access")
.HasColumnType("int");
b.Property("ChannelCreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("ChannelId")
.HasColumnType("uniqueidentifier");
b.Property("Code")
.HasColumnType("nvarchar(max)");
b.Property("CreatedChannelId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("Expiry")
.HasColumnType("datetime2");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("IsUsed")
.HasColumnType("bit");
b.Property("Message")
.HasColumnType("nvarchar(max)");
b.Property("PhoneNumber")
.IsRequired()
.HasMaxLength(11)
.HasColumnType("nvarchar(11)");
b.Property("RequestId")
.HasColumnType("nvarchar(max)");
b.Property("Sort")
.HasColumnType("int");
b.Property("Status")
.HasColumnType("int");
b.Property("TemplateCode")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property("TemplateParam")
.HasColumnType("nvarchar(max)");
b.Property("TraceId")
.HasColumnType("nvarchar(max)");
b.Property("UpdatedTime")
.HasColumnType("datetimeoffset");
b.Property("UpdatedUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("ChannelId");
b.ToTable("SmsLog");
});
modelBuilder.Entity("ApiTools.Core.SmsSetting", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("ChannelId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedChannelId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("DailyMaxCount")
.HasColumnType("int");
b.Property("HourlyMaxCount")
.HasColumnType("int");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("IsDisabled")
.HasColumnType("bit");
b.Property("MinutelyMaxCount")
.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("WithoutParams")
.HasColumnType("bit");
b.HasKey("Id");
b.HasIndex("ChannelId");
b.ToTable("SmsSetting");
});
modelBuilder.Entity("ApiTools.Core.SmsSettingAccess", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Access")
.HasColumnType("int");
b.Property("CreatedChannelId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("IsDisabled")
.HasColumnType("bit");
b.Property("SettingId")
.HasColumnType("uniqueidentifier");
b.Property("SignName")
.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("SettingId");
b.ToTable("SmsSettingAccess");
});
modelBuilder.Entity("ApiTools.Core.User", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Avatar")
.HasColumnType("nvarchar(max)");
b.Property("ChannelId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedChannelId")
.HasColumnType("uniqueidentifier");
b.Property("CreatedTime")
.HasColumnType("datetimeoffset");
b.Property("CreatedUserId")
.HasColumnType("uniqueidentifier");
b.Property