9921 lines
426 KiB
C#
9921 lines
426 KiB
C#
// <auto-generated />
|
||
using System;
|
||
using Microsoft.EntityFrameworkCore;
|
||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||
using TakeoutSaaS.Infrastructure.App.Persistence;
|
||
|
||
#nullable disable
|
||
|
||
namespace TakeoutSaaS.Infrastructure.Migrations
|
||
{
|
||
[DbContext(typeof(TakeoutAppDbContext))]
|
||
partial class TakeoutAppDbContextModelSnapshot : ModelSnapshot
|
||
{
|
||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||
{
|
||
#pragma warning disable 612, 618
|
||
modelBuilder
|
||
.HasAnnotation("ProductVersion", "10.0.1")
|
||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||
|
||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||
|
||
modelBuilder.Entity("MassTransit.EntityFrameworkCoreIntegration.InboxState", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime?>("Consumed")
|
||
.HasColumnType("timestamp with time zone");
|
||
|
||
b.Property<Guid>("ConsumerId")
|
||
.HasColumnType("uuid");
|
||
|
||
b.Property<DateTime?>("Delivered")
|
||
.HasColumnType("timestamp with time zone");
|
||
|
||
b.Property<DateTime?>("ExpirationTime")
|
||
.HasColumnType("timestamp with time zone");
|
||
|
||
b.Property<long?>("LastSequenceNumber")
|
||
.HasColumnType("bigint");
|
||
|
||
b.Property<Guid>("LockId")
|
||
.HasColumnType("uuid");
|
||
|
||
b.Property<Guid>("MessageId")
|
||
.HasColumnType("uuid");
|
||
|
||
b.Property<int>("ReceiveCount")
|
||
.HasColumnType("integer");
|
||
|
||
b.Property<DateTime>("Received")
|
||
.HasColumnType("timestamp with time zone");
|
||
|
||
b.Property<byte[]>("RowVersion")
|
||
.IsConcurrencyToken()
|
||
.ValueGeneratedOnAddOrUpdate()
|
||
.HasColumnType("bytea");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("Delivered");
|
||
|
||
b.ToTable("InboxState");
|
||
});
|
||
|
||
modelBuilder.Entity("MassTransit.EntityFrameworkCoreIntegration.OutboxMessage", b =>
|
||
{
|
||
b.Property<long>("SequenceNumber")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("SequenceNumber"));
|
||
|
||
b.Property<string>("Body")
|
||
.IsRequired()
|
||
.HasColumnType("text");
|
||
|
||
b.Property<string>("ContentType")
|
||
.IsRequired()
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)");
|
||
|
||
b.Property<Guid?>("ConversationId")
|
||
.HasColumnType("uuid");
|
||
|
||
b.Property<Guid?>("CorrelationId")
|
||
.HasColumnType("uuid");
|
||
|
||
b.Property<string>("DestinationAddress")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)");
|
||
|
||
b.Property<DateTime?>("EnqueueTime")
|
||
.HasColumnType("timestamp with time zone");
|
||
|
||
b.Property<DateTime?>("ExpirationTime")
|
||
.HasColumnType("timestamp with time zone");
|
||
|
||
b.Property<string>("FaultAddress")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)");
|
||
|
||
b.Property<string>("Headers")
|
||
.HasColumnType("text");
|
||
|
||
b.Property<Guid?>("InboxConsumerId")
|
||
.HasColumnType("uuid");
|
||
|
||
b.Property<Guid?>("InboxMessageId")
|
||
.HasColumnType("uuid");
|
||
|
||
b.Property<Guid?>("InitiatorId")
|
||
.HasColumnType("uuid");
|
||
|
||
b.Property<Guid>("MessageId")
|
||
.HasColumnType("uuid");
|
||
|
||
b.Property<string>("MessageType")
|
||
.IsRequired()
|
||
.HasColumnType("text");
|
||
|
||
b.Property<Guid?>("OutboxId")
|
||
.HasColumnType("uuid");
|
||
|
||
b.Property<string>("Properties")
|
||
.HasColumnType("text");
|
||
|
||
b.Property<Guid?>("RequestId")
|
||
.HasColumnType("uuid");
|
||
|
||
b.Property<string>("ResponseAddress")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)");
|
||
|
||
b.Property<DateTime>("SentTime")
|
||
.HasColumnType("timestamp with time zone");
|
||
|
||
b.Property<string>("SourceAddress")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)");
|
||
|
||
b.HasKey("SequenceNumber");
|
||
|
||
b.HasIndex("EnqueueTime");
|
||
|
||
b.HasIndex("ExpirationTime");
|
||
|
||
b.HasIndex("OutboxId", "SequenceNumber")
|
||
.IsUnique();
|
||
|
||
b.HasIndex("InboxMessageId", "InboxConsumerId", "SequenceNumber")
|
||
.IsUnique();
|
||
|
||
b.ToTable("OutboxMessage");
|
||
});
|
||
|
||
modelBuilder.Entity("MassTransit.EntityFrameworkCoreIntegration.OutboxState", b =>
|
||
{
|
||
b.Property<Guid>("OutboxId")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("uuid");
|
||
|
||
b.Property<DateTime>("Created")
|
||
.HasColumnType("timestamp with time zone");
|
||
|
||
b.Property<DateTime?>("Delivered")
|
||
.HasColumnType("timestamp with time zone");
|
||
|
||
b.Property<long?>("LastSequenceNumber")
|
||
.HasColumnType("bigint");
|
||
|
||
b.Property<Guid>("LockId")
|
||
.HasColumnType("uuid");
|
||
|
||
b.Property<byte[]>("RowVersion")
|
||
.IsConcurrencyToken()
|
||
.ValueGeneratedOnAddOrUpdate()
|
||
.HasColumnType("bytea");
|
||
|
||
b.HasKey("OutboxId");
|
||
|
||
b.HasIndex("Created");
|
||
|
||
b.ToTable("OutboxState");
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Analytics.Entities.MetricAlertRule", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("ConditionJson")
|
||
.IsRequired()
|
||
.HasColumnType("text")
|
||
.HasComment("触发条件 JSON。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<bool>("Enabled")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否启用。");
|
||
|
||
b.Property<long>("MetricDefinitionId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("关联指标。");
|
||
|
||
b.Property<string>("NotificationChannels")
|
||
.IsRequired()
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("通知渠道。");
|
||
|
||
b.Property<int>("Severity")
|
||
.HasColumnType("integer")
|
||
.HasComment("告警级别。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "MetricDefinitionId", "Severity");
|
||
|
||
b.ToTable("metric_alert_rules", null, t =>
|
||
{
|
||
t.HasComment("指标告警规则。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Analytics.Entities.MetricDefinition", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("Code")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("指标编码。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<string>("DefaultAggregation")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("默认聚合方式。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("Description")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("说明。");
|
||
|
||
b.Property<string>("DimensionsJson")
|
||
.HasColumnType("text")
|
||
.HasComment("维度描述 JSON。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("指标名称。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "Code")
|
||
.IsUnique();
|
||
|
||
b.ToTable("metric_definitions", null, t =>
|
||
{
|
||
t.HasComment("指标定义,描述可观测的数据点。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Analytics.Entities.MetricSnapshot", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("DimensionKey")
|
||
.IsRequired()
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("维度键(JSON)。");
|
||
|
||
b.Property<long>("MetricDefinitionId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("指标定义 ID。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<decimal>("Value")
|
||
.HasPrecision(18, 4)
|
||
.HasColumnType("numeric(18,4)")
|
||
.HasComment("数值。");
|
||
|
||
b.Property<DateTime>("WindowEnd")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("统计时间窗口结束。");
|
||
|
||
b.Property<DateTime>("WindowStart")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("统计时间窗口开始。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "MetricDefinitionId", "DimensionKey", "WindowStart", "WindowEnd")
|
||
.IsUnique();
|
||
|
||
b.ToTable("metric_snapshots", null, t =>
|
||
{
|
||
t.HasComment("指标快照,用于大盘展示。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Coupons.Entities.Coupon", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("Code")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("券码或序列号。");
|
||
|
||
b.Property<long>("CouponTemplateId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("模板标识。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime>("ExpireAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("到期时间。");
|
||
|
||
b.Property<DateTime>("IssuedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("发放时间。");
|
||
|
||
b.Property<long?>("OrderId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("订单 ID(已使用时记录)。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("状态。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("UsedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("使用时间。");
|
||
|
||
b.Property<long>("UserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("归属用户。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "Code")
|
||
.IsUnique();
|
||
|
||
b.ToTable("coupons", null, t =>
|
||
{
|
||
t.HasComment("用户领取的券。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Coupons.Entities.CouponTemplate", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<bool>("AllowStack")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否允许叠加其他优惠。");
|
||
|
||
b.Property<string>("ChannelsJson")
|
||
.HasColumnType("text")
|
||
.HasComment("发放渠道(JSON)。");
|
||
|
||
b.Property<int>("ClaimedQuantity")
|
||
.HasColumnType("integer")
|
||
.HasComment("已领取数量。");
|
||
|
||
b.Property<int>("CouponType")
|
||
.HasColumnType("integer")
|
||
.HasComment("券类型。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("Description")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("备注。");
|
||
|
||
b.Property<decimal?>("DiscountCap")
|
||
.HasColumnType("numeric")
|
||
.HasComment("折扣上限(针对折扣券)。");
|
||
|
||
b.Property<decimal?>("MinimumSpend")
|
||
.HasColumnType("numeric")
|
||
.HasComment("最低消费门槛。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("模板名称。");
|
||
|
||
b.Property<int?>("PerUserLimit")
|
||
.HasColumnType("integer")
|
||
.HasComment("每位用户可领取上限。");
|
||
|
||
b.Property<string>("ProductScopeJson")
|
||
.HasColumnType("text")
|
||
.HasComment("适用品类或商品范围(JSON)。");
|
||
|
||
b.Property<int?>("RelativeValidDays")
|
||
.HasColumnType("integer")
|
||
.HasComment("有效天数(相对发放时间)。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("状态。");
|
||
|
||
b.Property<string>("StoreScopeJson")
|
||
.HasColumnType("text")
|
||
.HasComment("适用门店 ID 集合(JSON)。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<int?>("TotalQuantity")
|
||
.HasColumnType("integer")
|
||
.HasComment("总发放数量上限。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("ValidFrom")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("可用开始时间。");
|
||
|
||
b.Property<DateTime?>("ValidTo")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("可用结束时间。");
|
||
|
||
b.Property<decimal>("Value")
|
||
.HasColumnType("numeric")
|
||
.HasComment("面值或折扣额度。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.ToTable("coupon_templates", null, t =>
|
||
{
|
||
t.HasComment("优惠券模板。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Coupons.Entities.NewCustomerCouponRule", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<int>("CouponType")
|
||
.HasColumnType("integer")
|
||
.HasComment("券类型。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<decimal?>("MinimumSpend")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("使用门槛。");
|
||
|
||
b.Property<int>("Scene")
|
||
.HasColumnType("integer")
|
||
.HasComment("券规则场景。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("排序值(同场景内递增)。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店 ID。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<int>("ValidDays")
|
||
.HasColumnType("integer")
|
||
.HasComment("有效期天数。");
|
||
|
||
b.Property<decimal?>("Value")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("面值或折扣值。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "Scene", "SortOrder");
|
||
|
||
b.ToTable("new_customer_coupon_rules", null, t =>
|
||
{
|
||
t.HasComment("新客有礼券规则。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Coupons.Entities.NewCustomerGiftSetting", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<decimal?>("DirectMinimumSpend")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("首单直减门槛金额。");
|
||
|
||
b.Property<decimal?>("DirectReduceAmount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("首单直减金额。");
|
||
|
||
b.Property<bool>("GiftEnabled")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否开启新客礼包。");
|
||
|
||
b.Property<int>("GiftType")
|
||
.HasColumnType("integer")
|
||
.HasComment("礼包类型。");
|
||
|
||
b.Property<bool>("InviteEnabled")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否开启老带新分享。");
|
||
|
||
b.Property<string>("ShareChannelsJson")
|
||
.IsRequired()
|
||
.HasColumnType("text")
|
||
.HasComment("分享渠道(JSON)。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店 ID。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId")
|
||
.IsUnique();
|
||
|
||
b.ToTable("new_customer_gift_settings", null, t =>
|
||
{
|
||
t.HasComment("新客有礼门店配置。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Coupons.Entities.NewCustomerGrowthRecord", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<string>("CustomerKey")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("顾客业务唯一键。");
|
||
|
||
b.Property<string>("CustomerName")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("顾客展示名。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime?>("FirstOrderAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("首单时间。");
|
||
|
||
b.Property<DateTime?>("GiftClaimedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("礼包领取时间。");
|
||
|
||
b.Property<DateTime>("RegisteredAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("注册时间。");
|
||
|
||
b.Property<string>("SourceChannel")
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("渠道来源。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店 ID。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "CustomerKey")
|
||
.IsUnique();
|
||
|
||
b.HasIndex("TenantId", "StoreId", "RegisteredAt");
|
||
|
||
b.ToTable("new_customer_growth_records", null, t =>
|
||
{
|
||
t.HasComment("新客成长记录。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Coupons.Entities.NewCustomerInviteRecord", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime>("InviteTime")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("邀请时间。");
|
||
|
||
b.Property<string>("InviteeName")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("被邀请人展示名。");
|
||
|
||
b.Property<string>("InviterName")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("邀请人展示名。");
|
||
|
||
b.Property<int>("OrderStatus")
|
||
.HasColumnType("integer")
|
||
.HasComment("订单状态。");
|
||
|
||
b.Property<DateTime?>("RewardIssuedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("奖励发放时间。");
|
||
|
||
b.Property<int>("RewardStatus")
|
||
.HasColumnType("integer")
|
||
.HasComment("奖励状态。");
|
||
|
||
b.Property<string>("SourceChannel")
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("邀请来源渠道。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店 ID。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "InviteTime");
|
||
|
||
b.ToTable("new_customer_invite_records", null, t =>
|
||
{
|
||
t.HasComment("新客邀请记录。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Coupons.Entities.PromotionCampaign", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("AudienceDescription")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("目标人群描述。");
|
||
|
||
b.Property<string>("BannerUrl")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("营销素材(如 banner)。");
|
||
|
||
b.Property<decimal?>("Budget")
|
||
.HasColumnType("numeric")
|
||
.HasComment("预算金额。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime>("EndAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("结束时间。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("活动名称。");
|
||
|
||
b.Property<int>("PromotionType")
|
||
.HasColumnType("integer")
|
||
.HasComment("活动类型。");
|
||
|
||
b.Property<string>("RulesJson")
|
||
.IsRequired()
|
||
.HasColumnType("text")
|
||
.HasComment("活动规则 JSON。");
|
||
|
||
b.Property<DateTime>("StartAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("开始时间。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("活动状态。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.ToTable("promotion_campaigns", null, t =>
|
||
{
|
||
t.HasComment("营销活动配置。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Coupons.Entities.PunchCardInstance", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime?>("ExpiresAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("过期时间(UTC,可空)。");
|
||
|
||
b.Property<string>("InstanceNo")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("实例编号(业务唯一)。");
|
||
|
||
b.Property<string>("MemberName")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("会员名称。");
|
||
|
||
b.Property<string>("MemberPhoneMasked")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("会员手机号(脱敏)。");
|
||
|
||
b.Property<decimal>("PaidAmount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("实付金额。");
|
||
|
||
b.Property<long>("PunchCardTemplateId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("次卡模板 ID。");
|
||
|
||
b.Property<DateTime>("PurchasedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("购买时间(UTC)。");
|
||
|
||
b.Property<int>("RemainingTimes")
|
||
.HasColumnType("integer")
|
||
.HasComment("剩余次数。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("实例状态。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店 ID。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<int>("TotalTimes")
|
||
.HasColumnType("integer")
|
||
.HasComment("总次数。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "InstanceNo")
|
||
.IsUnique();
|
||
|
||
b.HasIndex("TenantId", "StoreId", "PunchCardTemplateId");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "Status", "ExpiresAt");
|
||
|
||
b.ToTable("punch_card_instances", null, t =>
|
||
{
|
||
t.HasComment("次卡实例(顾客购买后生成)。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Coupons.Entities.PunchCardTemplate", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<bool>("AllowTransfer")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否允许转赠。");
|
||
|
||
b.Property<string>("CoverImageUrl")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("封面图片地址。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<int?>("DailyLimit")
|
||
.HasColumnType("integer")
|
||
.HasComment("每日限用次数。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("Description")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("次卡描述。");
|
||
|
||
b.Property<int>("ExpireStrategy")
|
||
.HasColumnType("integer")
|
||
.HasComment("过期策略。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("次卡名称。");
|
||
|
||
b.Property<string>("NotifyChannelsJson")
|
||
.IsRequired()
|
||
.HasColumnType("text")
|
||
.HasComment("购买通知渠道 JSON。");
|
||
|
||
b.Property<decimal?>("OriginalPrice")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("原价。");
|
||
|
||
b.Property<int?>("PerOrderLimit")
|
||
.HasColumnType("integer")
|
||
.HasComment("每单限用次数。");
|
||
|
||
b.Property<int?>("PerUserPurchaseLimit")
|
||
.HasColumnType("integer")
|
||
.HasComment("每人限购张数。");
|
||
|
||
b.Property<decimal>("SalePrice")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("售价。");
|
||
|
||
b.Property<string>("ScopeCategoryIdsJson")
|
||
.IsRequired()
|
||
.HasColumnType("text")
|
||
.HasComment("指定分类 ID JSON。");
|
||
|
||
b.Property<string>("ScopeProductIdsJson")
|
||
.IsRequired()
|
||
.HasColumnType("text")
|
||
.HasComment("指定商品 ID JSON。");
|
||
|
||
b.Property<string>("ScopeTagIdsJson")
|
||
.IsRequired()
|
||
.HasColumnType("text")
|
||
.HasComment("指定标签 ID JSON。");
|
||
|
||
b.Property<int>("ScopeType")
|
||
.HasColumnType("integer")
|
||
.HasComment("适用范围类型。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("次卡状态。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店 ID。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<int>("TotalTimes")
|
||
.HasColumnType("integer")
|
||
.HasComment("总次数。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<decimal?>("UsageCapAmount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("金额上限(UsageMode=Cap 时有效)。");
|
||
|
||
b.Property<int>("UsageMode")
|
||
.HasColumnType("integer")
|
||
.HasComment("使用模式。");
|
||
|
||
b.Property<DateTime?>("ValidFrom")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("固定开始日期(UTC,ValidityType=DateRange 时有效)。");
|
||
|
||
b.Property<DateTime?>("ValidTo")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("固定结束日期(UTC,ValidityType=DateRange 时有效)。");
|
||
|
||
b.Property<int?>("ValidityDays")
|
||
.HasColumnType("integer")
|
||
.HasComment("固定天数(ValidityType=Days 时有效)。");
|
||
|
||
b.Property<int>("ValidityType")
|
||
.HasColumnType("integer")
|
||
.HasComment("有效期类型。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "Name")
|
||
.IsUnique();
|
||
|
||
b.HasIndex("TenantId", "StoreId", "Status");
|
||
|
||
b.ToTable("punch_card_templates", null, t =>
|
||
{
|
||
t.HasComment("次卡模板配置。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Coupons.Entities.PunchCardUsageRecord", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<decimal?>("ExtraPayAmount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("超额补差金额。");
|
||
|
||
b.Property<string>("ProductName")
|
||
.IsRequired()
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("兑换商品名称。");
|
||
|
||
b.Property<long>("PunchCardInstanceId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("次卡实例 ID。");
|
||
|
||
b.Property<long>("PunchCardTemplateId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("次卡模板 ID。");
|
||
|
||
b.Property<string>("RecordNo")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("使用单号。");
|
||
|
||
b.Property<int>("RemainingTimesAfterUse")
|
||
.HasColumnType("integer")
|
||
.HasComment("使用后剩余次数。");
|
||
|
||
b.Property<int>("StatusAfterUse")
|
||
.HasColumnType("integer")
|
||
.HasComment("本次记录状态。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店 ID。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime>("UsedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("使用时间(UTC)。");
|
||
|
||
b.Property<int>("UsedTimes")
|
||
.HasColumnType("integer")
|
||
.HasComment("本次使用次数。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "RecordNo")
|
||
.IsUnique();
|
||
|
||
b.HasIndex("TenantId", "StoreId", "PunchCardInstanceId", "UsedAt");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "PunchCardTemplateId", "UsedAt");
|
||
|
||
b.ToTable("punch_card_usage_records", null, t =>
|
||
{
|
||
t.HasComment("次卡使用记录。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.CustomerService.Entities.ChatMessage", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<long>("ChatSessionId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("会话标识。");
|
||
|
||
b.Property<string>("Content")
|
||
.IsRequired()
|
||
.HasMaxLength(1024)
|
||
.HasColumnType("character varying(1024)")
|
||
.HasComment("消息内容。");
|
||
|
||
b.Property<string>("ContentType")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("消息类型(文字/图片/语音等)。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<bool>("IsRead")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否已读。");
|
||
|
||
b.Property<DateTime?>("ReadAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("读取时间。");
|
||
|
||
b.Property<int>("SenderType")
|
||
.HasColumnType("integer")
|
||
.HasComment("发送方类型。");
|
||
|
||
b.Property<long?>("SenderUserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("发送方用户 ID。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "ChatSessionId", "CreatedAt");
|
||
|
||
b.ToTable("chat_messages", null, t =>
|
||
{
|
||
t.HasComment("会话消息。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.CustomerService.Entities.ChatSession", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<long?>("AgentUserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("当前客服员工 ID。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<long>("CustomerUserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("顾客用户 ID。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime?>("EndedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("结束时间。");
|
||
|
||
b.Property<bool>("IsBotActive")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否机器人接待中。");
|
||
|
||
b.Property<string>("SessionCode")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("会话编号。");
|
||
|
||
b.Property<DateTime>("StartedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("开始时间。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("会话状态。");
|
||
|
||
b.Property<long?>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属门店(可空为系统会话)。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "SessionCode")
|
||
.IsUnique();
|
||
|
||
b.ToTable("chat_sessions", null, t =>
|
||
{
|
||
t.HasComment("客服会话。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.CustomerService.Entities.SupportTicket", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<long?>("AssignedAgentId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("指派的客服。");
|
||
|
||
b.Property<DateTime?>("ClosedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("关闭时间。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<long>("CustomerUserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("客户用户 ID。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("Description")
|
||
.IsRequired()
|
||
.HasColumnType("text")
|
||
.HasComment("工单详情。");
|
||
|
||
b.Property<long?>("OrderId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("关联订单(如有)。");
|
||
|
||
b.Property<int>("Priority")
|
||
.HasColumnType("integer")
|
||
.HasComment("优先级。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("状态。");
|
||
|
||
b.Property<string>("Subject")
|
||
.IsRequired()
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("工单主题。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<string>("TicketNo")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("工单编号。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "TicketNo")
|
||
.IsUnique();
|
||
|
||
b.ToTable("support_tickets", null, t =>
|
||
{
|
||
t.HasComment("客服工单。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.CustomerService.Entities.TicketComment", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("AttachmentsJson")
|
||
.HasColumnType("text")
|
||
.HasComment("附件 JSON。");
|
||
|
||
b.Property<long?>("AuthorUserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("评论人 ID。");
|
||
|
||
b.Property<string>("Content")
|
||
.IsRequired()
|
||
.HasMaxLength(1024)
|
||
.HasColumnType("character varying(1024)")
|
||
.HasComment("评论内容。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<bool>("IsInternal")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否内部备注。");
|
||
|
||
b.Property<long>("SupportTicketId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("工单标识。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "SupportTicketId");
|
||
|
||
b.ToTable("ticket_comments", null, t =>
|
||
{
|
||
t.HasComment("工单评论/流转记录。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Deliveries.Entities.DeliveryEvent", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<long>("DeliveryOrderId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("配送单标识。");
|
||
|
||
b.Property<int>("EventType")
|
||
.HasColumnType("integer")
|
||
.HasComment("事件类型。");
|
||
|
||
b.Property<string>("Message")
|
||
.IsRequired()
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("事件描述。");
|
||
|
||
b.Property<DateTime>("OccurredAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("发生时间。");
|
||
|
||
b.Property<string>("Payload")
|
||
.HasColumnType("text")
|
||
.HasComment("原始数据 JSON。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "DeliveryOrderId", "EventType");
|
||
|
||
b.ToTable("delivery_events", null, t =>
|
||
{
|
||
t.HasComment("配送状态事件流水。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Deliveries.Entities.DeliveryOrder", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("CourierName")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("骑手姓名。");
|
||
|
||
b.Property<string>("CourierPhone")
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("骑手电话。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime?>("DeliveredAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("完成时间。");
|
||
|
||
b.Property<decimal?>("DeliveryFee")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("配送费。");
|
||
|
||
b.Property<DateTime?>("DispatchedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("下发时间。");
|
||
|
||
b.Property<string>("FailureReason")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("异常原因。");
|
||
|
||
b.Property<long>("OrderId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("获取或设置关联订单 ID。");
|
||
|
||
b.Property<DateTime?>("PickedUpAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("取餐时间。");
|
||
|
||
b.Property<int>("Provider")
|
||
.HasColumnType("integer")
|
||
.HasComment("配送服务商。");
|
||
|
||
b.Property<string>("ProviderOrderId")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("第三方配送单号。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("状态。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "OrderId")
|
||
.IsUnique();
|
||
|
||
b.ToTable("delivery_orders", null, t =>
|
||
{
|
||
t.HasComment("配送单。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Distribution.Entities.AffiliateOrder", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<long>("AffiliatePartnerId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("推广人标识。");
|
||
|
||
b.Property<long>("BuyerUserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("用户 ID。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<decimal>("EstimatedCommission")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("预计佣金。");
|
||
|
||
b.Property<decimal>("OrderAmount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("订单金额。");
|
||
|
||
b.Property<long>("OrderId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("关联订单。");
|
||
|
||
b.Property<DateTime?>("SettledAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("结算完成时间。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("当前状态。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "AffiliatePartnerId", "OrderId")
|
||
.IsUnique();
|
||
|
||
b.ToTable("affiliate_orders", null, t =>
|
||
{
|
||
t.HasComment("分销订单记录。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Distribution.Entities.AffiliatePartner", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<int>("ChannelType")
|
||
.HasColumnType("integer")
|
||
.HasComment("渠道类型。");
|
||
|
||
b.Property<decimal>("CommissionRate")
|
||
.HasColumnType("numeric")
|
||
.HasComment("分成比例(0-1)。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("DisplayName")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("昵称或渠道名称。");
|
||
|
||
b.Property<string>("Phone")
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("联系电话。");
|
||
|
||
b.Property<string>("Remarks")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("审核备注。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("当前状态。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<long?>("UserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("用户 ID(如绑定登录账号)。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "DisplayName");
|
||
|
||
b.ToTable("affiliate_partners", null, t =>
|
||
{
|
||
t.HasComment("分销/推广合作伙伴。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Distribution.Entities.AffiliatePayout", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<long>("AffiliatePartnerId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("合作伙伴标识。");
|
||
|
||
b.Property<decimal>("Amount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("结算金额。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime?>("PaidAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("打款时间。");
|
||
|
||
b.Property<string>("Period")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("结算周期描述。");
|
||
|
||
b.Property<string>("Remarks")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("备注。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("状态。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "AffiliatePartnerId", "Period")
|
||
.IsUnique();
|
||
|
||
b.ToTable("affiliate_payouts", null, t =>
|
||
{
|
||
t.HasComment("佣金结算记录。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Engagement.Entities.CheckInCampaign", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<int>("AllowMakeupCount")
|
||
.HasColumnType("integer")
|
||
.HasComment("支持补签次数。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("Description")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("活动描述。");
|
||
|
||
b.Property<DateTime>("EndDate")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("结束日期。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("活动名称。");
|
||
|
||
b.Property<string>("RewardsJson")
|
||
.IsRequired()
|
||
.HasColumnType("text")
|
||
.HasComment("连签奖励 JSON。");
|
||
|
||
b.Property<DateTime>("StartDate")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("开始日期。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("状态。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "Name");
|
||
|
||
b.ToTable("checkin_campaigns", null, t =>
|
||
{
|
||
t.HasComment("签到活动配置。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Engagement.Entities.CheckInRecord", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<long>("CheckInCampaignId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("活动标识。");
|
||
|
||
b.Property<DateTime>("CheckInDate")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("签到日期(本地)。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<bool>("IsMakeup")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否补签。");
|
||
|
||
b.Property<string>("RewardJson")
|
||
.IsRequired()
|
||
.HasColumnType("text")
|
||
.HasComment("获得奖励 JSON。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<long>("UserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("用户标识。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "CheckInCampaignId", "UserId", "CheckInDate")
|
||
.IsUnique();
|
||
|
||
b.ToTable("checkin_records", null, t =>
|
||
{
|
||
t.HasComment("用户签到记录。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Engagement.Entities.CommunityComment", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<long>("AuthorUserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("评论人。");
|
||
|
||
b.Property<string>("Content")
|
||
.IsRequired()
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("评论内容。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<bool>("IsDeleted")
|
||
.HasColumnType("boolean")
|
||
.HasComment("状态。");
|
||
|
||
b.Property<long?>("ParentId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("父级评论 ID。");
|
||
|
||
b.Property<long>("PostId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("动态标识。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "PostId", "CreatedAt");
|
||
|
||
b.ToTable("community_comments", null, t =>
|
||
{
|
||
t.HasComment("社区评论。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Engagement.Entities.CommunityPost", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<long>("AuthorUserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("作者用户 ID。");
|
||
|
||
b.Property<int>("CommentCount")
|
||
.HasColumnType("integer")
|
||
.HasComment("评论数。");
|
||
|
||
b.Property<string>("Content")
|
||
.IsRequired()
|
||
.HasColumnType("text")
|
||
.HasComment("内容。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<int>("LikeCount")
|
||
.HasColumnType("integer")
|
||
.HasComment("点赞数。");
|
||
|
||
b.Property<string>("MediaJson")
|
||
.HasColumnType("text")
|
||
.HasComment("媒体资源 JSON。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("状态。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<string>("Title")
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("标题。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "AuthorUserId", "CreatedAt");
|
||
|
||
b.ToTable("community_posts", null, t =>
|
||
{
|
||
t.HasComment("社区动态。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Engagement.Entities.CommunityReaction", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<long>("PostId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("动态 ID。");
|
||
|
||
b.Property<DateTime>("ReactedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("时间戳。");
|
||
|
||
b.Property<int>("ReactionType")
|
||
.HasColumnType("integer")
|
||
.HasComment("反应类型。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<long>("UserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("用户 ID。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "PostId", "UserId")
|
||
.IsUnique();
|
||
|
||
b.ToTable("community_reactions", null, t =>
|
||
{
|
||
t.HasComment("社区互动反馈。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.GroupBuying.Entities.GroupOrder", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime?>("CancelledAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("取消时间。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<int>("CurrentCount")
|
||
.HasColumnType("integer")
|
||
.HasComment("当前已参与人数。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime>("EndAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("结束时间。");
|
||
|
||
b.Property<string>("GroupOrderNo")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("拼单编号。");
|
||
|
||
b.Property<decimal>("GroupPrice")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("拼团价格。");
|
||
|
||
b.Property<long>("LeaderUserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("团长用户 ID。");
|
||
|
||
b.Property<long>("ProductId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("关联商品或套餐。");
|
||
|
||
b.Property<DateTime>("StartAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("开始时间。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("拼团状态。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店标识。");
|
||
|
||
b.Property<DateTime?>("SucceededAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("成团时间。");
|
||
|
||
b.Property<int>("TargetCount")
|
||
.HasColumnType("integer")
|
||
.HasComment("成团需要的人数。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "GroupOrderNo")
|
||
.IsUnique();
|
||
|
||
b.ToTable("group_orders", null, t =>
|
||
{
|
||
t.HasComment("拼单活动。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.GroupBuying.Entities.GroupParticipant", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<long>("GroupOrderId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("拼单活动标识。");
|
||
|
||
b.Property<DateTime>("JoinedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("参与时间。");
|
||
|
||
b.Property<long>("OrderId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("对应订单标识。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("参与状态。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<long>("UserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("用户标识。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "GroupOrderId", "UserId")
|
||
.IsUnique();
|
||
|
||
b.ToTable("group_participants", null, t =>
|
||
{
|
||
t.HasComment("拼单参与者。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Inventory.Entities.InventoryAdjustment", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<int>("AdjustmentType")
|
||
.HasColumnType("integer")
|
||
.HasComment("调整类型。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<long>("InventoryItemId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("对应的库存记录标识。");
|
||
|
||
b.Property<DateTime>("OccurredAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("发生时间。");
|
||
|
||
b.Property<long?>("OperatorId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("操作人标识。");
|
||
|
||
b.Property<int>("Quantity")
|
||
.HasColumnType("integer")
|
||
.HasComment("调整数量,正数增加,负数减少。");
|
||
|
||
b.Property<string>("Reason")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("原因说明。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "InventoryItemId", "OccurredAt");
|
||
|
||
b.ToTable("inventory_adjustments", null, t =>
|
||
{
|
||
t.HasComment("库存调整记录。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Inventory.Entities.InventoryBatch", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("BatchNumber")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("批次编号。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime?>("ExpireDate")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("过期日期。");
|
||
|
||
b.Property<long>("ProductSkuId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("SKU 标识。");
|
||
|
||
b.Property<DateTime?>("ProductionDate")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("生产日期。");
|
||
|
||
b.Property<int>("Quantity")
|
||
.HasColumnType("integer")
|
||
.HasComment("入库数量。");
|
||
|
||
b.Property<int>("RemainingQuantity")
|
||
.HasColumnType("integer")
|
||
.HasComment("剩余数量。");
|
||
|
||
b.Property<byte[]>("RowVersion")
|
||
.IsConcurrencyToken()
|
||
.IsRequired()
|
||
.ValueGeneratedOnAddOrUpdate()
|
||
.HasColumnType("bytea")
|
||
.HasComment("并发控制字段。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店标识。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "ProductSkuId", "BatchNumber")
|
||
.IsUnique();
|
||
|
||
b.ToTable("inventory_batches", null, t =>
|
||
{
|
||
t.HasComment("SKU 批次信息。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Inventory.Entities.InventoryItem", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<int>("BatchConsumeStrategy")
|
||
.HasColumnType("integer")
|
||
.HasComment("批次扣减策略。");
|
||
|
||
b.Property<string>("BatchNumber")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("批次编号,可为空表示混批。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime?>("ExpireDate")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("过期日期。");
|
||
|
||
b.Property<bool>("IsPresale")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否预售商品。");
|
||
|
||
b.Property<bool>("IsSoldOut")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否标记售罄。");
|
||
|
||
b.Property<string>("Location")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("储位或仓位信息。");
|
||
|
||
b.Property<int?>("MaxQuantityPerOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("单品限购(覆盖商品级 MaxQuantityPerOrder)。");
|
||
|
||
b.Property<int?>("PresaleCapacity")
|
||
.HasColumnType("integer")
|
||
.HasComment("预售名额(上限)。");
|
||
|
||
b.Property<DateTime?>("PresaleEndTime")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("预售结束时间(UTC)。");
|
||
|
||
b.Property<int>("PresaleLocked")
|
||
.HasColumnType("integer")
|
||
.HasComment("当前预售已锁定数量。");
|
||
|
||
b.Property<DateTime?>("PresaleStartTime")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("预售开始时间(UTC)。");
|
||
|
||
b.Property<long>("ProductSkuId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("SKU 标识。");
|
||
|
||
b.Property<int>("QuantityOnHand")
|
||
.HasColumnType("integer")
|
||
.HasComment("可用库存。");
|
||
|
||
b.Property<int>("QuantityReserved")
|
||
.HasColumnType("integer")
|
||
.HasComment("已锁定库存(订单占用)。");
|
||
|
||
b.Property<byte[]>("RowVersion")
|
||
.IsConcurrencyToken()
|
||
.IsRequired()
|
||
.ValueGeneratedOnAddOrUpdate()
|
||
.HasColumnType("bytea")
|
||
.HasComment("并发控制字段。");
|
||
|
||
b.Property<int?>("SafetyStock")
|
||
.HasColumnType("integer")
|
||
.HasComment("安全库存阈值。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店标识。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "ProductSkuId", "BatchNumber");
|
||
|
||
b.ToTable("inventory_items", null, t =>
|
||
{
|
||
t.HasComment("SKU 在门店的库存信息。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Inventory.Entities.InventoryLockRecord", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime?>("ExpiresAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("过期时间(UTC)。");
|
||
|
||
b.Property<string>("IdempotencyKey")
|
||
.IsRequired()
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("幂等键。");
|
||
|
||
b.Property<bool>("IsPresale")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否预售锁定。");
|
||
|
||
b.Property<long>("ProductSkuId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("SKU ID。");
|
||
|
||
b.Property<int>("Quantity")
|
||
.HasColumnType("integer")
|
||
.HasComment("锁定数量。");
|
||
|
||
b.Property<byte[]>("RowVersion")
|
||
.IsConcurrencyToken()
|
||
.IsRequired()
|
||
.ValueGeneratedOnAddOrUpdate()
|
||
.HasColumnType("bytea")
|
||
.HasComment("并发控制字段。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("锁定状态。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店 ID。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "IdempotencyKey")
|
||
.IsUnique();
|
||
|
||
b.HasIndex("TenantId", "StoreId", "ProductSkuId", "Status");
|
||
|
||
b.ToTable("inventory_lock_records", null, t =>
|
||
{
|
||
t.HasComment("库存锁定记录。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Membership.Entities.MemberDaySetting", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<decimal>("ExtraDiscountRate")
|
||
.HasPrecision(5, 2)
|
||
.HasColumnType("numeric(5,2)")
|
||
.HasComment("会员日额外折扣(如 9 表示 9 折)。");
|
||
|
||
b.Property<bool>("IsEnabled")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否启用会员日。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<int>("Weekday")
|
||
.HasColumnType("integer")
|
||
.HasComment("周几(1-7,对应周一到周日)。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId")
|
||
.IsUnique();
|
||
|
||
b.ToTable("member_day_settings", null, t =>
|
||
{
|
||
t.HasComment("会员日配置。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Membership.Entities.MemberPointLedger", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<int>("BalanceAfterChange")
|
||
.HasColumnType("integer")
|
||
.HasComment("变动后余额。");
|
||
|
||
b.Property<int>("ChangeAmount")
|
||
.HasColumnType("integer")
|
||
.HasComment("变动数量,可为负值。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime?>("ExpireAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("过期时间(如适用)。");
|
||
|
||
b.Property<long>("MemberId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("会员标识。");
|
||
|
||
b.Property<DateTime>("OccurredAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("发生时间。");
|
||
|
||
b.Property<int>("Reason")
|
||
.HasColumnType("integer")
|
||
.HasComment("变动原因。");
|
||
|
||
b.Property<long?>("SourceId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("来源 ID(订单、活动等)。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "MemberId", "OccurredAt");
|
||
|
||
b.ToTable("member_point_ledgers", null, t =>
|
||
{
|
||
t.HasComment("积分变动流水。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Membership.Entities.MemberProfile", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("AvatarUrl")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("头像。");
|
||
|
||
b.Property<DateTime?>("BirthDate")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("生日。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<int>("GrowthValue")
|
||
.HasColumnType("integer")
|
||
.HasComment("成长值/经验值。");
|
||
|
||
b.Property<DateTime>("JoinedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("注册时间。");
|
||
|
||
b.Property<long?>("MemberTierId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("当前会员等级 ID。");
|
||
|
||
b.Property<string>("Mobile")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("手机号。");
|
||
|
||
b.Property<string>("Nickname")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("昵称。");
|
||
|
||
b.Property<int>("PointsBalance")
|
||
.HasColumnType("integer")
|
||
.HasComment("会员积分余额。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("会员状态。");
|
||
|
||
b.Property<decimal>("StoredBalance")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("储值余额。");
|
||
|
||
b.Property<decimal>("StoredGiftBalance")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("储值赠金余额。");
|
||
|
||
b.Property<decimal>("StoredRechargeBalance")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("储值实充余额。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<long>("UserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("用户标识。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "MemberTierId");
|
||
|
||
b.HasIndex("TenantId", "Mobile")
|
||
.IsUnique();
|
||
|
||
b.ToTable("member_profiles", null, t =>
|
||
{
|
||
t.HasComment("会员档案。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Membership.Entities.MemberProfileTag", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<long>("MemberProfileId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("会员标识。");
|
||
|
||
b.Property<string>("TagName")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("标签名。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "MemberProfileId");
|
||
|
||
b.HasIndex("TenantId", "MemberProfileId", "TagName")
|
||
.IsUnique();
|
||
|
||
b.ToTable("member_profile_tags", null, t =>
|
||
{
|
||
t.HasComment("会员标签。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Membership.Entities.MemberStoredCardPlan", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<decimal>("GiftAmount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("赠送金额。");
|
||
|
||
b.Property<decimal>("RechargeAmount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("充值金额。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("排序值(越小越靠前)。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("启用状态。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店标识。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "SortOrder");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "Status");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "RechargeAmount", "GiftAmount")
|
||
.IsUnique();
|
||
|
||
b.ToTable("member_stored_card_plans", null, t =>
|
||
{
|
||
t.HasComment("会员储值卡充值方案。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Membership.Entities.MemberStoredCardRechargeRecord", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<decimal>("ArrivedAmount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("到账金额(充值+赠送)。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<decimal>("GiftAmount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("赠送金额。");
|
||
|
||
b.Property<long>("MemberId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("会员标识。");
|
||
|
||
b.Property<string>("MemberMobileMasked")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("会员手机号快照(脱敏)。");
|
||
|
||
b.Property<string>("MemberName")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("会员名称快照。");
|
||
|
||
b.Property<int>("PaymentMethod")
|
||
.HasColumnType("integer")
|
||
.HasComment("支付方式。");
|
||
|
||
b.Property<long?>("PlanId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("充值方案标识(可空,表示非方案充值)。");
|
||
|
||
b.Property<decimal>("RechargeAmount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("充值金额。");
|
||
|
||
b.Property<DateTime>("RechargedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("充值时间(UTC)。");
|
||
|
||
b.Property<string>("RecordNo")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("充值单号。");
|
||
|
||
b.Property<string>("Remark")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("备注。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店标识。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "RechargedAt");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "RecordNo")
|
||
.IsUnique();
|
||
|
||
b.HasIndex("TenantId", "StoreId", "MemberId", "RechargedAt");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "PlanId", "RechargedAt");
|
||
|
||
b.ToTable("member_stored_card_recharge_records", null, t =>
|
||
{
|
||
t.HasComment("会员储值卡充值记录。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Membership.Entities.MemberTier", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("BenefitsJson")
|
||
.IsRequired()
|
||
.HasColumnType("text")
|
||
.HasComment("等级权益(JSON)。");
|
||
|
||
b.Property<string>("ColorHex")
|
||
.IsRequired()
|
||
.HasMaxLength(16)
|
||
.HasColumnType("character varying(16)")
|
||
.HasComment("主题色。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<int>("DowngradeWindowDays")
|
||
.HasColumnType("integer")
|
||
.HasComment("降级观察窗口天数。");
|
||
|
||
b.Property<string>("IconKey")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("图标键。");
|
||
|
||
b.Property<bool>("IsDefault")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否默认等级。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("等级名称。");
|
||
|
||
b.Property<int>("RequiredGrowth")
|
||
.HasColumnType("integer")
|
||
.HasComment("所需成长值。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("排序值。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<decimal?>("UpgradeAmountThreshold")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("升级累计消费门槛。");
|
||
|
||
b.Property<int?>("UpgradeOrderCountThreshold")
|
||
.HasColumnType("integer")
|
||
.HasComment("升级消费次数门槛。");
|
||
|
||
b.Property<string>("UpgradeRuleType")
|
||
.IsRequired()
|
||
.HasMaxLength(16)
|
||
.HasColumnType("character varying(16)")
|
||
.HasComment("升级规则类型(none/amount/count/both)。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "Name")
|
||
.IsUnique();
|
||
|
||
b.HasIndex("TenantId", "SortOrder");
|
||
|
||
b.ToTable("member_tiers", null, t =>
|
||
{
|
||
t.HasComment("会员等级定义。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Merchants.Entities.Merchant", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("Address")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("详细地址。");
|
||
|
||
b.Property<DateTime?>("ApprovedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("审核通过时间。");
|
||
|
||
b.Property<long?>("ApprovedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("审核通过人。");
|
||
|
||
b.Property<string>("BrandAlias")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("品牌简称或别名。");
|
||
|
||
b.Property<string>("BrandName")
|
||
.IsRequired()
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("品牌名称(对外展示)。");
|
||
|
||
b.Property<string>("BusinessLicenseImageUrl")
|
||
.HasColumnType("text")
|
||
.HasComment("营业执照扫描件地址。");
|
||
|
||
b.Property<string>("BusinessLicenseNumber")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("营业执照号。");
|
||
|
||
b.Property<string>("Category")
|
||
.HasColumnType("text")
|
||
.HasComment("品牌所属品类,如火锅、咖啡等。");
|
||
|
||
b.Property<string>("City")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("所在城市。");
|
||
|
||
b.Property<DateTime?>("ClaimExpiresAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("领取过期时间。");
|
||
|
||
b.Property<DateTime?>("ClaimedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("领取时间。");
|
||
|
||
b.Property<long?>("ClaimedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("当前领取人。");
|
||
|
||
b.Property<string>("ClaimedByName")
|
||
.HasMaxLength(100)
|
||
.HasColumnType("character varying(100)")
|
||
.HasComment("当前领取人姓名。");
|
||
|
||
b.Property<string>("ContactEmail")
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("联系邮箱。");
|
||
|
||
b.Property<string>("ContactPhone")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("联系电话。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("District")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("所在区县。");
|
||
|
||
b.Property<DateTime?>("FrozenAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("冻结时间。");
|
||
|
||
b.Property<string>("FrozenReason")
|
||
.HasMaxLength(500)
|
||
.HasColumnType("character varying(500)")
|
||
.HasComment("冻结原因。");
|
||
|
||
b.Property<string>("GeoFailReason")
|
||
.HasMaxLength(500)
|
||
.HasColumnType("character varying(500)")
|
||
.HasComment("地理定位失败原因。");
|
||
|
||
b.Property<DateTime?>("GeoNextRetryAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("下次地理定位重试时间(UTC)。");
|
||
|
||
b.Property<int>("GeoRetryCount")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("integer")
|
||
.HasDefaultValue(0)
|
||
.HasComment("地理定位重试次数。");
|
||
|
||
b.Property<int>("GeoStatus")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("integer")
|
||
.HasDefaultValue(0)
|
||
.HasComment("地理定位状态。");
|
||
|
||
b.Property<DateTime?>("GeoUpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("地理定位最近成功时间(UTC)。");
|
||
|
||
b.Property<bool>("IsFrozen")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("boolean")
|
||
.HasDefaultValue(false)
|
||
.HasComment("是否冻结业务。");
|
||
|
||
b.Property<DateTime?>("JoinedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("入驻时间。");
|
||
|
||
b.Property<DateTime?>("LastReviewedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次审核时间。");
|
||
|
||
b.Property<long?>("LastReviewedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最近一次审核人。");
|
||
|
||
b.Property<double?>("Latitude")
|
||
.HasColumnType("double precision")
|
||
.HasComment("纬度信息。");
|
||
|
||
b.Property<string>("LegalPerson")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("法人或负责人姓名。");
|
||
|
||
b.Property<string>("LogoUrl")
|
||
.HasColumnType("text")
|
||
.HasComment("品牌 Logo。");
|
||
|
||
b.Property<double?>("Longitude")
|
||
.HasColumnType("double precision")
|
||
.HasComment("经度信息。");
|
||
|
||
b.Property<int?>("OperatingMode")
|
||
.HasColumnType("integer")
|
||
.HasComment("经营模式(同一主体/不同主体)。");
|
||
|
||
b.Property<string>("Province")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("所在省份。");
|
||
|
||
b.Property<string>("ReviewRemarks")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("审核备注或驳回原因。");
|
||
|
||
b.Property<string>("ServicePhone")
|
||
.HasColumnType("text")
|
||
.HasComment("客服电话。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("入驻状态。");
|
||
|
||
b.Property<string>("SupportEmail")
|
||
.HasColumnType("text")
|
||
.HasComment("客服邮箱。");
|
||
|
||
b.Property<string>("TaxNumber")
|
||
.HasColumnType("text")
|
||
.HasComment("税号/统一社会信用代码。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<uint>("xmin")
|
||
.IsConcurrencyToken()
|
||
.ValueGeneratedOnAddOrUpdate()
|
||
.HasColumnType("xid")
|
||
.HasColumnName("xmin");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("ClaimedBy");
|
||
|
||
b.HasIndex("TenantId");
|
||
|
||
b.HasIndex("Longitude", "Latitude")
|
||
.HasFilter("\"Longitude\" IS NOT NULL AND \"Latitude\" IS NOT NULL");
|
||
|
||
b.HasIndex("TenantId", "Status");
|
||
|
||
b.HasIndex("TenantId", "GeoStatus", "GeoNextRetryAt");
|
||
|
||
b.ToTable("merchants", null, t =>
|
||
{
|
||
t.HasComment("商户主体信息,承载入驻和资质审核结果。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Merchants.Entities.MerchantCategory", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<int>("DisplayOrder")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("integer")
|
||
.HasDefaultValue(0)
|
||
.HasComment("显示顺序,越小越靠前。");
|
||
|
||
b.Property<bool>("IsActive")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否可用。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("类目名称。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "Name")
|
||
.IsUnique();
|
||
|
||
b.ToTable("merchant_categories", null, t =>
|
||
{
|
||
t.HasComment("商户可选类目。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Merchants.Entities.MerchantContract", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("ContractNumber")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("合同编号。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime>("EndDate")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("合同结束时间。");
|
||
|
||
b.Property<string>("FileUrl")
|
||
.IsRequired()
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("合同文件存储地址。");
|
||
|
||
b.Property<long>("MerchantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属商户标识。");
|
||
|
||
b.Property<DateTime?>("SignedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("签署时间。");
|
||
|
||
b.Property<DateTime>("StartDate")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("合同开始时间。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("合同状态。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("TerminatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("终止时间。");
|
||
|
||
b.Property<string>("TerminationReason")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("终止原因。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "MerchantId", "ContractNumber")
|
||
.IsUnique();
|
||
|
||
b.ToTable("merchant_contracts", null, t =>
|
||
{
|
||
t.HasComment("商户合同记录。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Merchants.Entities.MerchantDocument", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("DocumentNumber")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("证照编号。");
|
||
|
||
b.Property<int>("DocumentType")
|
||
.HasColumnType("integer")
|
||
.HasComment("证照类型。");
|
||
|
||
b.Property<DateTime?>("ExpiresAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("到期日期。");
|
||
|
||
b.Property<string>("FileUrl")
|
||
.IsRequired()
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("证照文件链接。");
|
||
|
||
b.Property<DateTime?>("IssuedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("签发日期。");
|
||
|
||
b.Property<long>("MerchantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属商户标识。");
|
||
|
||
b.Property<string>("Remarks")
|
||
.HasColumnType("text")
|
||
.HasComment("审核备注或驳回原因。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("审核状态。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "MerchantId", "DocumentType");
|
||
|
||
b.ToTable("merchant_documents", null, t =>
|
||
{
|
||
t.HasComment("商户提交的资质或证照材料。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Merchants.Entities.MerchantStaff", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("Email")
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("邮箱地址。");
|
||
|
||
b.Property<long?>("IdentityUserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("登录账号 ID(指向统一身份体系)。");
|
||
|
||
b.Property<long>("MerchantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属商户标识。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("员工姓名。");
|
||
|
||
b.Property<string>("PermissionsJson")
|
||
.HasColumnType("text")
|
||
.HasComment("自定义权限(JSON)。");
|
||
|
||
b.Property<string>("Phone")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("手机号。");
|
||
|
||
b.Property<int>("RoleType")
|
||
.HasColumnType("integer")
|
||
.HasComment("员工角色类型。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("员工状态。");
|
||
|
||
b.Property<long?>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("可选的关联门店 ID。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "MerchantId", "Phone");
|
||
|
||
b.ToTable("merchant_staff", null, t =>
|
||
{
|
||
t.HasComment("商户员工账号,支持门店维度分配。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Navigation.Entities.MapLocation", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("Address")
|
||
.IsRequired()
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("地址。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("Landmark")
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("打车/导航落点描述。");
|
||
|
||
b.Property<double>("Latitude")
|
||
.HasColumnType("double precision")
|
||
.HasComment("纬度。");
|
||
|
||
b.Property<double>("Longitude")
|
||
.HasColumnType("double precision")
|
||
.HasComment("经度。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("名称。");
|
||
|
||
b.Property<long?>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("关联门店 ID,可空表示独立 POI。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId");
|
||
|
||
b.ToTable("map_locations", null, t =>
|
||
{
|
||
t.HasComment("地图 POI 信息,用于门店定位和推荐。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Navigation.Entities.NavigationRequest", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<int>("Channel")
|
||
.HasColumnType("integer")
|
||
.HasComment("来源通道(小程序、H5 等)。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime>("RequestedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("请求时间。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店 ID。");
|
||
|
||
b.Property<int>("TargetApp")
|
||
.HasColumnType("integer")
|
||
.HasComment("跳转的地图应用。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<long>("UserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("用户 ID。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "UserId", "StoreId", "RequestedAt");
|
||
|
||
b.ToTable("navigation_requests", null, t =>
|
||
{
|
||
t.HasComment("用户发起的导航请求日志。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Ordering.Entities.CartItem", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("AttributesJson")
|
||
.HasColumnType("text")
|
||
.HasComment("扩展 JSON(规格、加料选项等)。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<long>("ProductId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("商品或 SKU 标识。");
|
||
|
||
b.Property<string>("ProductName")
|
||
.IsRequired()
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("商品名称快照。");
|
||
|
||
b.Property<long?>("ProductSkuId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("SKU 标识。");
|
||
|
||
b.Property<int>("Quantity")
|
||
.HasColumnType("integer")
|
||
.HasComment("数量。");
|
||
|
||
b.Property<string>("Remark")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("自定义备注(口味要求)。");
|
||
|
||
b.Property<long>("ShoppingCartId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属购物车标识。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("状态。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<decimal>("UnitPrice")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("单价快照。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "ShoppingCartId");
|
||
|
||
b.ToTable("cart_items", null, t =>
|
||
{
|
||
t.HasComment("购物车条目。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Ordering.Entities.CartItemAddon", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<long>("CartItemId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属购物车条目。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<decimal>("ExtraPrice")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("附加价格。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("选项名称。");
|
||
|
||
b.Property<long?>("OptionId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("选项 ID(可对应 ProductAddonOption)。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.ToTable("cart_item_addons", null, t =>
|
||
{
|
||
t.HasComment("购物车条目的加料/附加项。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Ordering.Entities.CheckoutSession", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime>("ExpiresAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("过期时间(UTC)。");
|
||
|
||
b.Property<string>("SessionToken")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("会话 Token。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("会话状态。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店标识。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<long>("UserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("用户标识。");
|
||
|
||
b.Property<string>("ValidationResultJson")
|
||
.IsRequired()
|
||
.HasColumnType("text")
|
||
.HasComment("校验结果明细 JSON。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "SessionToken")
|
||
.IsUnique();
|
||
|
||
b.ToTable("checkout_sessions", null, t =>
|
||
{
|
||
t.HasComment("结账会话,记录校验上下文。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Ordering.Entities.ShoppingCart", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("DeliveryPreference")
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("履约方式(堂食/自提/配送)缓存。");
|
||
|
||
b.Property<DateTime>("LastModifiedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次修改时间(UTC)。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("购物车状态,包含正常/锁定。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店标识。");
|
||
|
||
b.Property<string>("TableContext")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("桌码或场景标识(扫码点餐)。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<long>("UserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("用户标识。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "UserId", "StoreId")
|
||
.IsUnique();
|
||
|
||
b.ToTable("shopping_carts", null, t =>
|
||
{
|
||
t.HasComment("用户购物车,按租户/门店隔离。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Orders.Entities.Order", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("CancelReason")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("取消原因。");
|
||
|
||
b.Property<DateTime?>("CancelledAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("取消时间。");
|
||
|
||
b.Property<int>("Channel")
|
||
.HasColumnType("integer")
|
||
.HasComment("下单渠道。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<string>("CustomerName")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("顾客姓名。");
|
||
|
||
b.Property<string>("CustomerPhone")
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("顾客手机号。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<int>("DeliveryType")
|
||
.HasColumnType("integer")
|
||
.HasComment("履约类型。");
|
||
|
||
b.Property<decimal>("DiscountAmount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("优惠金额。");
|
||
|
||
b.Property<DateTime?>("FinishedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("完成时间。");
|
||
|
||
b.Property<decimal>("ItemsAmount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("商品总额。");
|
||
|
||
b.Property<string>("OrderNo")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("订单号。");
|
||
|
||
b.Property<decimal>("PaidAmount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("实付金额。");
|
||
|
||
b.Property<DateTime?>("PaidAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("支付时间。");
|
||
|
||
b.Property<decimal>("PayableAmount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("应付金额。");
|
||
|
||
b.Property<int>("PaymentStatus")
|
||
.HasColumnType("integer")
|
||
.HasComment("支付状态。");
|
||
|
||
b.Property<string>("QueueNumber")
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("排队号(如有)。");
|
||
|
||
b.Property<string>("Remark")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("备注。");
|
||
|
||
b.Property<long?>("ReservationId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("预约 ID。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("当前状态。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店。");
|
||
|
||
b.Property<string>("TableNo")
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("就餐桌号。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "OrderNo")
|
||
.IsUnique();
|
||
|
||
b.HasIndex("TenantId", "StoreId", "Status");
|
||
|
||
b.ToTable("orders", null, t =>
|
||
{
|
||
t.HasComment("交易订单。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Orders.Entities.OrderItem", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("AttributesJson")
|
||
.HasColumnType("text")
|
||
.HasComment("自定义属性 JSON。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<decimal>("DiscountAmount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("折扣金额。");
|
||
|
||
b.Property<long>("OrderId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("订单 ID。");
|
||
|
||
b.Property<long>("ProductId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("商品 ID。");
|
||
|
||
b.Property<string>("ProductName")
|
||
.IsRequired()
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("商品名称。");
|
||
|
||
b.Property<int>("Quantity")
|
||
.HasColumnType("integer")
|
||
.HasComment("数量。");
|
||
|
||
b.Property<string>("SkuName")
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("SKU/规格描述。");
|
||
|
||
b.Property<decimal>("SubTotal")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("小计。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<string>("Unit")
|
||
.HasMaxLength(16)
|
||
.HasColumnType("character varying(16)")
|
||
.HasComment("单位。");
|
||
|
||
b.Property<decimal>("UnitPrice")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("单价。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("OrderId");
|
||
|
||
b.HasIndex("TenantId", "OrderId");
|
||
|
||
b.ToTable("order_items", null, t =>
|
||
{
|
||
t.HasComment("订单明细。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Orders.Entities.OrderStatusHistory", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("Notes")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("备注信息。");
|
||
|
||
b.Property<DateTime>("OccurredAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("发生时间。");
|
||
|
||
b.Property<long?>("OperatorId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("操作人标识(可为空表示系统)。");
|
||
|
||
b.Property<long>("OrderId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("订单标识。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("变更后的状态。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "OrderId", "OccurredAt");
|
||
|
||
b.ToTable("order_status_histories", null, t =>
|
||
{
|
||
t.HasComment("订单状态流转记录。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Orders.Entities.RefundRequest", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<decimal>("Amount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("申请金额。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<long>("OrderId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("关联订单标识。");
|
||
|
||
b.Property<DateTime?>("ProcessedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("审核完成时间。");
|
||
|
||
b.Property<string>("Reason")
|
||
.IsRequired()
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("申请原因。");
|
||
|
||
b.Property<string>("RefundNo")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("退款单号。");
|
||
|
||
b.Property<DateTime>("RequestedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("用户提交时间。");
|
||
|
||
b.Property<string>("ReviewNotes")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("审核备注。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("退款状态。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "RefundNo")
|
||
.IsUnique();
|
||
|
||
b.ToTable("refund_requests", null, t =>
|
||
{
|
||
t.HasComment("售后/退款申请。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Payments.Entities.PaymentRecord", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<decimal>("Amount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("支付金额。");
|
||
|
||
b.Property<string>("ChannelTransactionId")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("第三方渠道单号。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<int>("Method")
|
||
.HasColumnType("integer")
|
||
.HasComment("支付方式。");
|
||
|
||
b.Property<long>("OrderId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("关联订单。");
|
||
|
||
b.Property<DateTime?>("PaidAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("支付完成时间。");
|
||
|
||
b.Property<string>("Payload")
|
||
.HasColumnType("text")
|
||
.HasComment("原始回调内容。");
|
||
|
||
b.Property<string>("Remark")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("错误/备注。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("支付状态。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<string>("TradeNo")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("系统交易号。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "OrderId");
|
||
|
||
b.ToTable("payment_records", null, t =>
|
||
{
|
||
t.HasComment("支付流水。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Payments.Entities.PaymentRefundRecord", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<decimal>("Amount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("退款金额。");
|
||
|
||
b.Property<string>("ChannelRefundId")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("渠道退款流水号。");
|
||
|
||
b.Property<DateTime?>("CompletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("完成时间。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<long>("OrderId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("关联订单标识。");
|
||
|
||
b.Property<string>("Payload")
|
||
.HasColumnType("text")
|
||
.HasComment("渠道返回的原始数据 JSON。");
|
||
|
||
b.Property<long>("PaymentRecordId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("原支付记录标识。");
|
||
|
||
b.Property<DateTime>("RequestedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("退款请求时间。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("退款状态。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "PaymentRecordId");
|
||
|
||
b.ToTable("payment_refund_records", null, t =>
|
||
{
|
||
t.HasComment("支付渠道退款流水。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.Product", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<long>("CategoryId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属分类。");
|
||
|
||
b.Property<string>("CoverImage")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("主图。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("Description")
|
||
.HasColumnType("text")
|
||
.HasComment("商品描述。");
|
||
|
||
b.Property<bool>("EnableDelivery")
|
||
.HasColumnType("boolean")
|
||
.HasComment("支持配送。");
|
||
|
||
b.Property<bool>("EnableDineIn")
|
||
.HasColumnType("boolean")
|
||
.HasComment("支持堂食。");
|
||
|
||
b.Property<bool>("EnablePickup")
|
||
.HasColumnType("boolean")
|
||
.HasComment("支持自提。");
|
||
|
||
b.Property<string>("GalleryImages")
|
||
.HasMaxLength(1024)
|
||
.HasColumnType("character varying(1024)")
|
||
.HasComment("Gallery 图片逗号分隔。");
|
||
|
||
b.Property<bool>("IsFeatured")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否热门推荐。");
|
||
|
||
b.Property<int>("Kind")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("integer")
|
||
.HasDefaultValue(0)
|
||
.HasComment("商品类型。");
|
||
|
||
b.Property<int?>("MaxQuantityPerOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("最大每单限购。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("商品名称。");
|
||
|
||
b.Property<bool>("NotifyManager")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("boolean")
|
||
.HasDefaultValue(false)
|
||
.HasComment("是否通知店长。");
|
||
|
||
b.Property<decimal?>("OriginalPrice")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("原价。");
|
||
|
||
b.Property<decimal?>("PackingFee")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("打包费(元/份)。");
|
||
|
||
b.Property<decimal>("Price")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("现价。");
|
||
|
||
b.Property<DateTime?>("RecoverAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("沽清恢复时间。");
|
||
|
||
b.Property<int?>("RemainStock")
|
||
.HasColumnType("integer")
|
||
.HasComment("沽清后剩余可售。");
|
||
|
||
b.Property<int>("SalesMonthly")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("integer")
|
||
.HasDefaultValue(0)
|
||
.HasComment("月销量。");
|
||
|
||
b.Property<int?>("SoldoutMode")
|
||
.HasColumnType("integer")
|
||
.HasComment("沽清模式。");
|
||
|
||
b.Property<string>("SoldoutReason")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("沽清原因。");
|
||
|
||
b.Property<int>("SortWeight")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("integer")
|
||
.HasDefaultValue(0)
|
||
.HasComment("排序权重,越大越靠前。");
|
||
|
||
b.Property<string>("SpuCode")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("商品编码。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("商品状态。");
|
||
|
||
b.Property<int?>("StockQuantity")
|
||
.HasColumnType("integer")
|
||
.HasComment("库存数量(可选)。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属门店。");
|
||
|
||
b.Property<string>("Subtitle")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("副标题/卖点。");
|
||
|
||
b.Property<bool>("SyncToPlatform")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("boolean")
|
||
.HasDefaultValue(true)
|
||
.HasComment("是否同步通知外卖平台。");
|
||
|
||
b.Property<string>("TagsJson")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("text")
|
||
.HasDefaultValue("[]")
|
||
.HasComment("标签 JSON(字符串数组)。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("TimedOnShelfAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("定时上架时间。");
|
||
|
||
b.Property<string>("Unit")
|
||
.HasMaxLength(16)
|
||
.HasColumnType("character varying(16)")
|
||
.HasComment("售卖单位(份/杯等)。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<int?>("WarningStock")
|
||
.HasColumnType("integer")
|
||
.HasComment("库存预警值。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "SpuCode")
|
||
.IsUnique();
|
||
|
||
b.HasIndex("TenantId", "StoreId");
|
||
|
||
b.ToTable("products", null, t =>
|
||
{
|
||
t.HasComment("商品(SPU)信息。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductAddonGroup", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<bool>("IsRequired")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否必选。");
|
||
|
||
b.Property<int?>("MaxSelect")
|
||
.HasColumnType("integer")
|
||
.HasComment("最大选择数量。");
|
||
|
||
b.Property<int?>("MinSelect")
|
||
.HasColumnType("integer")
|
||
.HasComment("最小选择数量。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("分组名称。");
|
||
|
||
b.Property<long>("ProductId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属商品。");
|
||
|
||
b.Property<int>("SelectionType")
|
||
.HasColumnType("integer")
|
||
.HasComment("选择类型。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("排序值。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "ProductId", "Name");
|
||
|
||
b.ToTable("product_addon_groups", null, t =>
|
||
{
|
||
t.HasComment("加料/做法分组。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductAddonOption", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<long>("AddonGroupId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属加料分组。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<decimal?>("ExtraPrice")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("附加价格。");
|
||
|
||
b.Property<bool>("IsDefault")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否默认选项。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("选项名称。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("排序。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.ToTable("product_addon_options", null, t =>
|
||
{
|
||
t.HasComment("加料选项。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductAttributeGroup", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<bool>("IsRequired")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否必选。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("分组名称,例如“辣度”“份量”。");
|
||
|
||
b.Property<long>("ProductId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属商品标识。");
|
||
|
||
b.Property<int>("SelectionType")
|
||
.HasColumnType("integer")
|
||
.HasComment("选择类型(单选/多选)。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("显示排序。");
|
||
|
||
b.Property<long?>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("关联门店,可为空表示所有门店共享。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "Name");
|
||
|
||
b.ToTable("product_attribute_groups", null, t =>
|
||
{
|
||
t.HasComment("商品规格/属性分组。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductAttributeOption", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<long>("AttributeGroupId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属规格组。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<decimal?>("ExtraPrice")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("附加价格。");
|
||
|
||
b.Property<bool>("IsDefault")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否默认选中。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("选项名称。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("排序。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "AttributeGroupId", "Name")
|
||
.IsUnique();
|
||
|
||
b.ToTable("product_attribute_options", null, t =>
|
||
{
|
||
t.HasComment("商品规格选项。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductCategory", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("ChannelsJson")
|
||
.IsRequired()
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("text")
|
||
.HasDefaultValue("[\"wm\"]")
|
||
.HasComment("分类可见渠道 JSON。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("Description")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("分类描述。");
|
||
|
||
b.Property<string>("Icon")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("分类图标。");
|
||
|
||
b.Property<bool>("IsEnabled")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否启用。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("分类名称。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("排序值。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属门店。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId");
|
||
|
||
b.ToTable("product_categories", null, t =>
|
||
{
|
||
t.HasComment("商品分类。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductComboGroup", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<int>("MaxSelect")
|
||
.HasColumnType("integer")
|
||
.HasComment("最大选择数。");
|
||
|
||
b.Property<int>("MinSelect")
|
||
.HasColumnType("integer")
|
||
.HasComment("最小选择数。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("分组名称。");
|
||
|
||
b.Property<long>("ProductId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("套餐商品 ID。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("排序值。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "ProductId", "Name");
|
||
|
||
b.HasIndex("TenantId", "ProductId", "SortOrder");
|
||
|
||
b.ToTable("product_combo_groups", null, t =>
|
||
{
|
||
t.HasComment("套餐分组。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductComboGroupItem", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<long>("ComboGroupId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属套餐分组 ID。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<long>("ProductId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("商品 ID。");
|
||
|
||
b.Property<int>("Quantity")
|
||
.HasColumnType("integer")
|
||
.HasComment("数量。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("排序值。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "ComboGroupId", "ProductId")
|
||
.IsUnique();
|
||
|
||
b.HasIndex("TenantId", "ComboGroupId", "SortOrder");
|
||
|
||
b.ToTable("product_combo_group_items", null, t =>
|
||
{
|
||
t.HasComment("套餐分组内商品。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductLabel", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("Color")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("标签颜色(HEX)。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<bool>("IsEnabled")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否启用。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("标签名称。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("排序值。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属门店。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "Name")
|
||
.IsUnique();
|
||
|
||
b.HasIndex("TenantId", "StoreId", "IsEnabled", "SortOrder");
|
||
|
||
b.ToTable("product_labels", null, t =>
|
||
{
|
||
t.HasComment("商品标签模板(门店维度)。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductLabelProduct", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<long>("LabelId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("标签 ID。");
|
||
|
||
b.Property<long>("ProductId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("商品 ID。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属门店。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "ProductId");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "LabelId", "ProductId")
|
||
.IsUnique();
|
||
|
||
b.ToTable("product_label_products", null, t =>
|
||
{
|
||
t.HasComment("标签与商品关联关系。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductMediaAsset", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("Caption")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("描述或标题。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<int>("MediaType")
|
||
.HasColumnType("integer")
|
||
.HasComment("媒体类型。");
|
||
|
||
b.Property<long>("ProductId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("商品标识。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("排序。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<string>("Url")
|
||
.IsRequired()
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("媒资链接。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.ToTable("product_media_assets", null, t =>
|
||
{
|
||
t.HasComment("商品媒资素材。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductPricingRule", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("ConditionsJson")
|
||
.IsRequired()
|
||
.HasColumnType("text")
|
||
.HasComment("条件描述(JSON),如会员等级、渠道等。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime?>("EndTime")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("生效结束时间。");
|
||
|
||
b.Property<decimal>("Price")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("特殊价格。");
|
||
|
||
b.Property<long>("ProductId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属商品。");
|
||
|
||
b.Property<int>("RuleType")
|
||
.HasColumnType("integer")
|
||
.HasComment("策略类型。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("排序值。");
|
||
|
||
b.Property<DateTime?>("StartTime")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("生效开始时间。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<string>("WeekdaysJson")
|
||
.HasColumnType("text")
|
||
.HasComment("生效星期(JSON 数组)。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "ProductId", "RuleType");
|
||
|
||
b.ToTable("product_pricing_rules", null, t =>
|
||
{
|
||
t.HasComment("商品价格策略,支持会员价/时段价等。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductSchedule", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<TimeSpan>("EndTime")
|
||
.HasColumnType("interval")
|
||
.HasComment("结束时间。");
|
||
|
||
b.Property<bool>("IsEnabled")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否启用。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("规则名称。");
|
||
|
||
b.Property<TimeSpan>("StartTime")
|
||
.HasColumnType("interval")
|
||
.HasComment("开始时间。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属门店。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<int>("WeekDaysMask")
|
||
.HasColumnType("integer")
|
||
.HasComment("星期位掩码(周一到周日)。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "IsEnabled");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "Name")
|
||
.IsUnique();
|
||
|
||
b.ToTable("product_schedules", null, t =>
|
||
{
|
||
t.HasComment("商品时段规则(门店维度)。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductScheduleProduct", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<long>("ProductId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("商品 ID。");
|
||
|
||
b.Property<long>("ScheduleId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("时段规则 ID。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属门店。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "ProductId");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "ScheduleId", "ProductId")
|
||
.IsUnique();
|
||
|
||
b.ToTable("product_schedule_products", null, t =>
|
||
{
|
||
t.HasComment("时段规则与商品关联关系。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductSku", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("AttributesJson")
|
||
.IsRequired()
|
||
.HasColumnType("text")
|
||
.HasComment("规格属性 JSON(记录选项 ID)。");
|
||
|
||
b.Property<string>("Barcode")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("条形码。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<bool>("IsEnabled")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("boolean")
|
||
.HasDefaultValue(true)
|
||
.HasComment("是否启用。");
|
||
|
||
b.Property<decimal?>("OriginalPrice")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("原价。");
|
||
|
||
b.Property<decimal>("Price")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("售价。");
|
||
|
||
b.Property<long>("ProductId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属商品标识。");
|
||
|
||
b.Property<string>("SkuCode")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("SKU 编码。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("排序值。");
|
||
|
||
b.Property<int?>("StockQuantity")
|
||
.HasColumnType("integer")
|
||
.HasComment("可售库存。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<decimal?>("Weight")
|
||
.HasPrecision(10, 3)
|
||
.HasColumnType("numeric(10,3)")
|
||
.HasComment("重量(千克)。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "ProductId");
|
||
|
||
b.HasIndex("TenantId", "SkuCode")
|
||
.IsUnique();
|
||
|
||
b.ToTable("product_skus", null, t =>
|
||
{
|
||
t.HasComment("商品 SKU,记录具体规格组合价格。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductSkuSaveJob", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("ErrorMessage")
|
||
.HasMaxLength(2000)
|
||
.HasColumnType("character varying(2000)")
|
||
.HasComment("失败摘要。");
|
||
|
||
b.Property<int>("FailedCount")
|
||
.HasColumnType("integer")
|
||
.HasComment("失败条数。");
|
||
|
||
b.Property<DateTime?>("FinishedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("完成时间(UTC)。");
|
||
|
||
b.Property<string>("HangfireJobId")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("Hangfire 任务 ID。");
|
||
|
||
b.Property<string>("Mode")
|
||
.IsRequired()
|
||
.HasMaxLength(16)
|
||
.HasColumnType("character varying(16)")
|
||
.HasComment("任务模式(当前固定 replace)。");
|
||
|
||
b.Property<string>("PayloadJson")
|
||
.IsRequired()
|
||
.HasColumnType("text")
|
||
.HasComment("任务请求负载 JSON 快照。");
|
||
|
||
b.Property<long>("ProductId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属商品 ID。");
|
||
|
||
b.Property<int>("ProgressProcessed")
|
||
.HasColumnType("integer")
|
||
.HasComment("已处理数。");
|
||
|
||
b.Property<int>("ProgressTotal")
|
||
.HasColumnType("integer")
|
||
.HasComment("总处理数。");
|
||
|
||
b.Property<DateTime?>("StartedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("开始执行时间(UTC)。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("任务状态。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属门店 ID。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "ProductId", "CreatedAt");
|
||
|
||
b.HasIndex("TenantId", "Status", "CreatedAt");
|
||
|
||
b.ToTable("product_sku_save_jobs", null, t =>
|
||
{
|
||
t.HasComment("商品 SKU 异步保存任务。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductSpecTemplate", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("Description")
|
||
.IsRequired()
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("模板描述。");
|
||
|
||
b.Property<bool>("IsEnabled")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否启用。");
|
||
|
||
b.Property<bool>("IsRequired")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否必选。");
|
||
|
||
b.Property<int>("MaxSelect")
|
||
.HasColumnType("integer")
|
||
.HasComment("最大可选数。");
|
||
|
||
b.Property<int>("MinSelect")
|
||
.HasColumnType("integer")
|
||
.HasComment("最小可选数。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("模板名称。");
|
||
|
||
b.Property<int>("SelectionType")
|
||
.HasColumnType("integer")
|
||
.HasComment("选择方式。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("排序值。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属门店。");
|
||
|
||
b.Property<int>("TemplateType")
|
||
.HasColumnType("integer")
|
||
.HasComment("模板类型。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "TemplateType", "IsEnabled");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "TemplateType", "Name")
|
||
.IsUnique();
|
||
|
||
b.ToTable("product_spec_templates", null, t =>
|
||
{
|
||
t.HasComment("门店规格做法模板。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductSpecTemplateOption", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<decimal>("ExtraPrice")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("附加价格。");
|
||
|
||
b.Property<bool>("IsEnabled")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否启用。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("选项名称。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("排序值。");
|
||
|
||
b.Property<int>("Stock")
|
||
.HasColumnType("integer")
|
||
.HasComment("库存数量。");
|
||
|
||
b.Property<long>("TemplateId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("模板 ID。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "TemplateId", "Name")
|
||
.IsUnique();
|
||
|
||
b.ToTable("product_spec_template_options", null, t =>
|
||
{
|
||
t.HasComment("规格做法模板选项。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Products.Entities.ProductSpecTemplateProduct", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<long>("ProductId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("商品 ID。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属门店。");
|
||
|
||
b.Property<long>("TemplateId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("模板 ID。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "ProductId");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "TemplateId", "ProductId")
|
||
.IsUnique();
|
||
|
||
b.ToTable("product_spec_template_products", null, t =>
|
||
{
|
||
t.HasComment("规格做法模板与商品关联。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Queues.Entities.QueueTicket", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime?>("CalledAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("叫号时间。");
|
||
|
||
b.Property<DateTime?>("CancelledAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("取消时间。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<int?>("EstimatedWaitMinutes")
|
||
.HasColumnType("integer")
|
||
.HasComment("预计等待分钟。");
|
||
|
||
b.Property<DateTime?>("ExpiredAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("过号时间。");
|
||
|
||
b.Property<int>("PartySize")
|
||
.HasColumnType("integer")
|
||
.HasComment("就餐人数。");
|
||
|
||
b.Property<string>("Remark")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("备注。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("状态。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("获取或设置所属门店 ID。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<string>("TicketNumber")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("排队编号。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "TicketNumber")
|
||
.IsUnique();
|
||
|
||
b.ToTable("queue_tickets", null, t =>
|
||
{
|
||
t.HasComment("排队叫号。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Reservations.Entities.Reservation", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime?>("CancelledAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("取消时间。");
|
||
|
||
b.Property<string>("CheckInCode")
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("核销码/到店码。");
|
||
|
||
b.Property<DateTime?>("CheckedInAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("实际签到时间。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<string>("CustomerName")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("客户姓名。");
|
||
|
||
b.Property<string>("CustomerPhone")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("联系电话。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<int>("PeopleCount")
|
||
.HasColumnType("integer")
|
||
.HasComment("用餐人数。");
|
||
|
||
b.Property<string>("Remark")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("备注。");
|
||
|
||
b.Property<string>("ReservationNo")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("预约号。");
|
||
|
||
b.Property<DateTime>("ReservationTime")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("预约时间(UTC)。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("状态。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店。");
|
||
|
||
b.Property<string>("TablePreference")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("桌型/标签。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "ReservationNo")
|
||
.IsUnique();
|
||
|
||
b.HasIndex("TenantId", "StoreId");
|
||
|
||
b.ToTable("reservations", null, t =>
|
||
{
|
||
t.HasComment("预约/预订记录。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.Store", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime?>("ActivatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("审核通过时间。");
|
||
|
||
b.Property<string>("Address")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("详细地址。");
|
||
|
||
b.Property<string>("Announcement")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("门店公告。");
|
||
|
||
b.Property<int>("AuditStatus")
|
||
.HasColumnType("integer")
|
||
.HasComment("审核状态。");
|
||
|
||
b.Property<string>("BusinessHours")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("门店营业时段描述(备用字符串)。");
|
||
|
||
b.Property<string>("BusinessLicenseImageUrl")
|
||
.HasMaxLength(500)
|
||
.HasColumnType("character varying(500)")
|
||
.HasComment("门店营业执照图片地址(主体不一致模式使用)。");
|
||
|
||
b.Property<string>("BusinessLicenseNumber")
|
||
.HasMaxLength(50)
|
||
.HasColumnType("character varying(50)")
|
||
.HasComment("门店营业执照号(主体不一致模式使用)。");
|
||
|
||
b.Property<int>("BusinessStatus")
|
||
.HasColumnType("integer")
|
||
.HasComment("经营状态。");
|
||
|
||
b.Property<long?>("CategoryId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("行业类目 ID。");
|
||
|
||
b.Property<string>("City")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("所在城市。");
|
||
|
||
b.Property<int?>("ClosureReason")
|
||
.HasColumnType("integer")
|
||
.HasComment("歇业原因。");
|
||
|
||
b.Property<string>("ClosureReasonText")
|
||
.HasMaxLength(500)
|
||
.HasColumnType("character varying(500)")
|
||
.HasComment("歇业原因补充说明。");
|
||
|
||
b.Property<string>("Code")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("门店编码,便于扫码及外部对接。");
|
||
|
||
b.Property<string>("Country")
|
||
.HasColumnType("text")
|
||
.HasComment("所在国家或地区。");
|
||
|
||
b.Property<string>("CoverImageUrl")
|
||
.HasColumnType("text")
|
||
.HasComment("门店海报。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<decimal>("DeliveryRadiusKm")
|
||
.HasPrecision(6, 2)
|
||
.HasColumnType("numeric(6,2)")
|
||
.HasComment("默认配送半径(公里)。");
|
||
|
||
b.Property<string>("Description")
|
||
.HasColumnType("text")
|
||
.HasComment("门店描述或公告。");
|
||
|
||
b.Property<string>("District")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("区县信息。");
|
||
|
||
b.Property<string>("ForceCloseReason")
|
||
.HasMaxLength(500)
|
||
.HasColumnType("character varying(500)")
|
||
.HasComment("强制关闭原因。");
|
||
|
||
b.Property<DateTime?>("ForceClosedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("强制关闭时间。");
|
||
|
||
b.Property<string>("GeoFailReason")
|
||
.HasMaxLength(500)
|
||
.HasColumnType("character varying(500)")
|
||
.HasComment("地理定位失败原因。");
|
||
|
||
b.Property<DateTime?>("GeoNextRetryAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("下次地理定位重试时间(UTC)。");
|
||
|
||
b.Property<int>("GeoRetryCount")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("integer")
|
||
.HasDefaultValue(0)
|
||
.HasComment("地理定位重试次数。");
|
||
|
||
b.Property<int>("GeoStatus")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("integer")
|
||
.HasDefaultValue(0)
|
||
.HasComment("地理定位状态。");
|
||
|
||
b.Property<DateTime?>("GeoUpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("地理定位最近成功时间(UTC)。");
|
||
|
||
b.Property<double?>("Latitude")
|
||
.HasColumnType("double precision")
|
||
.HasComment("纬度。");
|
||
|
||
b.Property<string>("LegalRepresentative")
|
||
.HasMaxLength(100)
|
||
.HasColumnType("character varying(100)")
|
||
.HasComment("门店法人(主体不一致模式使用)。");
|
||
|
||
b.Property<double?>("Longitude")
|
||
.HasColumnType("double precision")
|
||
.HasComment("高德/腾讯地图经度。");
|
||
|
||
b.Property<string>("ManagerName")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("门店负责人姓名。");
|
||
|
||
b.Property<long>("MerchantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属商户标识。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("门店名称。");
|
||
|
||
b.Property<int>("OwnershipType")
|
||
.HasColumnType("integer")
|
||
.HasComment("主体类型。");
|
||
|
||
b.Property<string>("Phone")
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("联系电话。");
|
||
|
||
b.Property<string>("Province")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("所在省份。");
|
||
|
||
b.Property<string>("RegisteredAddress")
|
||
.HasMaxLength(500)
|
||
.HasColumnType("character varying(500)")
|
||
.HasComment("门店注册地址(主体不一致模式使用)。");
|
||
|
||
b.Property<string>("RejectionReason")
|
||
.HasMaxLength(500)
|
||
.HasColumnType("character varying(500)")
|
||
.HasComment("审核驳回原因。");
|
||
|
||
b.Property<string>("SignboardImageUrl")
|
||
.HasMaxLength(500)
|
||
.HasColumnType("character varying(500)")
|
||
.HasComment("门头招牌图 URL。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("门店当前运营状态。");
|
||
|
||
b.Property<DateTime?>("SubmittedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("提交审核时间。");
|
||
|
||
b.Property<bool>("SupportsDelivery")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否支持配送。");
|
||
|
||
b.Property<bool>("SupportsDineIn")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否支持堂食。");
|
||
|
||
b.Property<bool>("SupportsPickup")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否支持自提。");
|
||
|
||
b.Property<bool>("SupportsQueueing")
|
||
.HasColumnType("boolean")
|
||
.HasComment("支持排队叫号。");
|
||
|
||
b.Property<bool>("SupportsReservation")
|
||
.HasColumnType("boolean")
|
||
.HasComment("支持预约。");
|
||
|
||
b.Property<string>("Tags")
|
||
.HasColumnType("text")
|
||
.HasComment("门店标签(逗号分隔)。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("Longitude", "Latitude")
|
||
.HasFilter("\"Longitude\" IS NOT NULL AND \"Latitude\" IS NOT NULL");
|
||
|
||
b.HasIndex("MerchantId", "BusinessLicenseNumber")
|
||
.IsUnique()
|
||
.HasFilter("\"BusinessLicenseNumber\" IS NOT NULL AND \"Status\" <> 3");
|
||
|
||
b.HasIndex("TenantId", "AuditStatus");
|
||
|
||
b.HasIndex("TenantId", "BusinessStatus");
|
||
|
||
b.HasIndex("TenantId", "Code")
|
||
.IsUnique();
|
||
|
||
b.HasIndex("TenantId", "MerchantId");
|
||
|
||
b.HasIndex("TenantId", "OwnershipType");
|
||
|
||
b.HasIndex("TenantId", "MerchantId", "GeoStatus", "GeoNextRetryAt");
|
||
|
||
b.ToTable("stores", null, t =>
|
||
{
|
||
t.HasComment("门店信息,承载营业配置与能力。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StoreAuditRecord", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<int>("Action")
|
||
.HasColumnType("integer")
|
||
.HasComment("操作类型。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<int>("NewStatus")
|
||
.HasColumnType("integer")
|
||
.HasComment("操作后状态。");
|
||
|
||
b.Property<long?>("OperatorId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("操作人 ID。");
|
||
|
||
b.Property<string>("OperatorName")
|
||
.IsRequired()
|
||
.HasMaxLength(100)
|
||
.HasColumnType("character varying(100)")
|
||
.HasComment("操作人名称。");
|
||
|
||
b.Property<int?>("PreviousStatus")
|
||
.HasColumnType("integer")
|
||
.HasComment("操作前状态。");
|
||
|
||
b.Property<string>("RejectionReason")
|
||
.HasMaxLength(500)
|
||
.HasColumnType("character varying(500)")
|
||
.HasComment("驳回理由文本。");
|
||
|
||
b.Property<long?>("RejectionReasonId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("驳回理由 ID。");
|
||
|
||
b.Property<string>("Remarks")
|
||
.HasMaxLength(1000)
|
||
.HasColumnType("character varying(1000)")
|
||
.HasComment("备注。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店标识。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("CreatedAt");
|
||
|
||
b.HasIndex("TenantId", "StoreId");
|
||
|
||
b.ToTable("store_audit_records", null, t =>
|
||
{
|
||
t.HasComment("门店审核记录。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StoreBusinessHour", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<int?>("CapacityLimit")
|
||
.HasColumnType("integer")
|
||
.HasComment("最大接待容量或单量限制。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<int>("DayOfWeek")
|
||
.HasColumnType("integer")
|
||
.HasComment("星期几,0 表示周日。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<TimeSpan>("EndTime")
|
||
.HasColumnType("interval")
|
||
.HasComment("结束时间(本地时间)。");
|
||
|
||
b.Property<int>("HourType")
|
||
.HasColumnType("integer")
|
||
.HasComment("时段类型(正常营业、休息、预约等)。");
|
||
|
||
b.Property<string>("Notes")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("备注。");
|
||
|
||
b.Property<TimeSpan>("StartTime")
|
||
.HasColumnType("interval")
|
||
.HasComment("开始时间(本地时间)。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店标识。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "DayOfWeek");
|
||
|
||
b.ToTable("store_business_hours", null, t =>
|
||
{
|
||
t.HasComment("门店营业时段配置。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StoreDeliverySetting", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<int>("EtaAdjustmentMinutes")
|
||
.HasColumnType("integer")
|
||
.HasComment("配送时效加成(分钟)。");
|
||
|
||
b.Property<decimal?>("FreeDeliveryThreshold")
|
||
.HasPrecision(10, 2)
|
||
.HasColumnType("numeric(10,2)")
|
||
.HasComment("免配送费门槛。");
|
||
|
||
b.Property<int>("HourlyCapacityLimit")
|
||
.HasColumnType("integer")
|
||
.HasComment("每小时配送上限。");
|
||
|
||
b.Property<decimal>("MaxDeliveryDistance")
|
||
.HasPrecision(10, 2)
|
||
.HasColumnType("numeric(10,2)")
|
||
.HasComment("最大配送距离(公里)。");
|
||
|
||
b.Property<int>("Mode")
|
||
.HasColumnType("integer")
|
||
.HasComment("配送模式。");
|
||
|
||
b.Property<decimal?>("RadiusCenterLatitude")
|
||
.HasPrecision(10, 7)
|
||
.HasColumnType("numeric(10,7)")
|
||
.HasComment("半径配送中心点纬度。");
|
||
|
||
b.Property<decimal?>("RadiusCenterLongitude")
|
||
.HasPrecision(10, 7)
|
||
.HasColumnType("numeric(10,7)")
|
||
.HasComment("半径配送中心点经度。");
|
||
|
||
b.Property<string>("RadiusTiersJson")
|
||
.HasColumnType("text")
|
||
.HasComment("半径梯度配置 JSON。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店 ID。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId")
|
||
.IsUnique();
|
||
|
||
b.ToTable("store_delivery_settings", null, t =>
|
||
{
|
||
t.HasComment("门店配送设置聚合。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StoreDeliveryZone", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("Color")
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("区域颜色。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<decimal?>("DeliveryFee")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("配送费。");
|
||
|
||
b.Property<int?>("EstimatedMinutes")
|
||
.HasColumnType("integer")
|
||
.HasComment("预计送达分钟。");
|
||
|
||
b.Property<decimal?>("MinimumOrderAmount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("起送价。");
|
||
|
||
b.Property<string>("PolygonGeoJson")
|
||
.IsRequired()
|
||
.HasColumnType("text")
|
||
.HasComment("GeoJSON 表示的多边形范围。");
|
||
|
||
b.Property<int>("Priority")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("integer")
|
||
.HasDefaultValue(100)
|
||
.HasComment("优先级(数值越小越优先)。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("排序值。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店标识。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<string>("ZoneName")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("区域名称。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "ZoneName");
|
||
|
||
b.ToTable("store_delivery_zones", null, t =>
|
||
{
|
||
t.HasComment("门店配送范围配置。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StoreDineInSetting", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<int>("DefaultDiningMinutes")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("integer")
|
||
.HasDefaultValue(90)
|
||
.HasComment("默认用餐时长(分钟)。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<bool>("Enabled")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("boolean")
|
||
.HasDefaultValue(true)
|
||
.HasComment("是否启用堂食。");
|
||
|
||
b.Property<int>("OvertimeReminderMinutes")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("integer")
|
||
.HasDefaultValue(10)
|
||
.HasComment("超时提醒阈值(分钟)。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店 ID。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId")
|
||
.IsUnique();
|
||
|
||
b.ToTable("store_dinein_settings", null, t =>
|
||
{
|
||
t.HasComment("门店堂食基础设置。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StoreEmployeeShift", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<TimeSpan>("EndTime")
|
||
.HasColumnType("interval")
|
||
.HasComment("结束时间。");
|
||
|
||
b.Property<string>("Notes")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("备注。");
|
||
|
||
b.Property<int>("RoleType")
|
||
.HasColumnType("integer")
|
||
.HasComment("排班角色。");
|
||
|
||
b.Property<DateTime>("ShiftDate")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("班次日期。");
|
||
|
||
b.Property<long>("StaffId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("员工标识。");
|
||
|
||
b.Property<TimeSpan>("StartTime")
|
||
.HasColumnType("interval")
|
||
.HasComment("开始时间。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店标识。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "ShiftDate", "StaffId")
|
||
.IsUnique();
|
||
|
||
b.ToTable("store_employee_shifts", null, t =>
|
||
{
|
||
t.HasComment("门店员工排班记录。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StoreFee", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<decimal>("BaseDeliveryFee")
|
||
.HasPrecision(10, 2)
|
||
.HasColumnType("numeric(10,2)")
|
||
.HasComment("基础配送费(元)。");
|
||
|
||
b.Property<decimal>("PlatformServiceRate")
|
||
.HasPrecision(5, 2)
|
||
.HasColumnType("numeric(5,2)")
|
||
.HasComment("平台服务费率(%)。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<decimal>("CutleryFeeAmount")
|
||
.HasPrecision(10, 2)
|
||
.HasColumnType("numeric(10,2)")
|
||
.HasComment("餐具费金额。");
|
||
|
||
b.Property<bool>("CutleryFeeEnabled")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("boolean")
|
||
.HasDefaultValue(false)
|
||
.HasComment("是否启用餐具费。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<decimal>("FixedPackagingFee")
|
||
.HasPrecision(10, 2)
|
||
.HasColumnType("numeric(10,2)")
|
||
.HasComment("固定打包费(总计模式有效)。");
|
||
|
||
b.Property<decimal?>("FreeDeliveryThreshold")
|
||
.HasPrecision(10, 2)
|
||
.HasColumnType("numeric(10,2)")
|
||
.HasComment("免配送费门槛。");
|
||
|
||
b.Property<decimal>("MinimumOrderAmount")
|
||
.HasPrecision(10, 2)
|
||
.HasColumnType("numeric(10,2)")
|
||
.HasComment("起送费(元)。");
|
||
|
||
b.Property<int>("OrderPackagingFeeMode")
|
||
.HasColumnType("integer")
|
||
.HasComment("订单打包费规则(按订单收费时生效)。");
|
||
|
||
b.Property<int>("PackagingFeeMode")
|
||
.HasColumnType("integer")
|
||
.HasComment("打包费模式。");
|
||
|
||
b.Property<string>("PackagingFeeTiersJson")
|
||
.HasColumnType("text")
|
||
.HasComment("阶梯打包费配置(JSON)。");
|
||
|
||
b.Property<decimal>("RushFeeAmount")
|
||
.HasPrecision(10, 2)
|
||
.HasColumnType("numeric(10,2)")
|
||
.HasComment("加急费金额。");
|
||
|
||
b.Property<bool>("RushFeeEnabled")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("boolean")
|
||
.HasDefaultValue(false)
|
||
.HasComment("是否启用加急费。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店标识。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId");
|
||
|
||
b.HasIndex("TenantId", "StoreId")
|
||
.IsUnique();
|
||
|
||
b.ToTable("store_fees", null, t =>
|
||
{
|
||
t.HasComment("门店费用配置。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StoreHoliday", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime>("Date")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("开始日期(原 Date 字段)。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime?>("EndDate")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("结束日期(可选,用于日期范围,如春节 1.28~2.4)。");
|
||
|
||
b.Property<TimeSpan?>("EndTime")
|
||
.HasColumnType("interval")
|
||
.HasComment("结束时间(IsAllDay=false 时使用)。");
|
||
|
||
b.Property<bool>("IsAllDay")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("boolean")
|
||
.HasDefaultValue(true)
|
||
.HasComment("是否全天生效。true=全天;false=仅 StartTime~EndTime 时段。");
|
||
|
||
b.Property<bool>("IsClosed")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("boolean")
|
||
.HasDefaultValue(true)
|
||
.HasComment("是否闭店(兼容旧数据,新逻辑请用 OverrideType)。");
|
||
|
||
b.Property<int>("OverrideType")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("integer")
|
||
.HasDefaultValue(0)
|
||
.HasComment("覆盖类型(闭店/临时营业/调整时间)。");
|
||
|
||
b.Property<string>("Reason")
|
||
.HasMaxLength(200)
|
||
.HasColumnType("character varying(200)")
|
||
.HasComment("说明内容。");
|
||
|
||
b.Property<TimeSpan?>("StartTime")
|
||
.HasColumnType("interval")
|
||
.HasComment("开始时间(IsAllDay=false 时使用)。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店标识。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "Date");
|
||
|
||
b.ToTable("store_holidays", null, t =>
|
||
{
|
||
t.HasComment("门店临时时段配置(节假日/歇业/调整营业时间)。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StorePickupSetting", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<int>("AllowDaysAhead")
|
||
.HasColumnType("integer")
|
||
.HasComment("可预约天数(含当天)。");
|
||
|
||
b.Property<bool>("AllowToday")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否允许当天自提。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<int>("DefaultCutoffMinutes")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("integer")
|
||
.HasDefaultValue(30)
|
||
.HasComment("默认截单分钟(开始前多少分钟截止)。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("FineRuleJson")
|
||
.HasColumnType("text")
|
||
.HasComment("精细规则 JSON。");
|
||
|
||
b.Property<int?>("MaxQuantityPerOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("单笔自提最大份数。");
|
||
|
||
b.Property<int>("Mode")
|
||
.HasColumnType("integer")
|
||
.HasComment("自提配置模式。");
|
||
|
||
b.Property<byte[]>("RowVersion")
|
||
.IsConcurrencyToken()
|
||
.IsRequired()
|
||
.HasColumnType("bytea")
|
||
.HasComment("并发控制字段。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店标识。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId")
|
||
.IsUnique();
|
||
|
||
b.ToTable("store_pickup_settings", null, t =>
|
||
{
|
||
t.HasComment("门店自提配置。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StorePickupSlot", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<int>("Capacity")
|
||
.HasColumnType("integer")
|
||
.HasComment("容量(份数)。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<int>("CutoffMinutes")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("integer")
|
||
.HasDefaultValue(30)
|
||
.HasComment("截单分钟(开始前多少分钟截止)。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<TimeSpan>("EndTime")
|
||
.HasColumnType("interval")
|
||
.HasComment("当天结束时间(UTC)。");
|
||
|
||
b.Property<bool>("IsEnabled")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否启用。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("档期名称。");
|
||
|
||
b.Property<int>("ReservedCount")
|
||
.HasColumnType("integer")
|
||
.HasComment("已占用数量。");
|
||
|
||
b.Property<byte[]>("RowVersion")
|
||
.IsConcurrencyToken()
|
||
.IsRequired()
|
||
.HasColumnType("bytea")
|
||
.HasComment("并发控制字段。");
|
||
|
||
b.Property<TimeSpan>("StartTime")
|
||
.HasColumnType("interval")
|
||
.HasComment("当天开始时间(UTC)。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店标识。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<string>("Weekdays")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("适用星期(逗号分隔 1-7)。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "Name");
|
||
|
||
b.ToTable("store_pickup_slots", null, t =>
|
||
{
|
||
t.HasComment("门店自提档期。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StoreQualification", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("DocumentNumber")
|
||
.HasMaxLength(100)
|
||
.HasColumnType("character varying(100)")
|
||
.HasComment("证照编号。");
|
||
|
||
b.Property<DateOnly?>("ExpiresAt")
|
||
.HasColumnType("date")
|
||
.HasComment("到期日期。");
|
||
|
||
b.Property<string>("FileUrl")
|
||
.IsRequired()
|
||
.HasMaxLength(500)
|
||
.HasColumnType("character varying(500)")
|
||
.HasComment("证照文件 URL。");
|
||
|
||
b.Property<DateOnly?>("IssuedAt")
|
||
.HasColumnType("date")
|
||
.HasComment("签发日期。");
|
||
|
||
b.Property<int>("QualificationType")
|
||
.HasColumnType("integer")
|
||
.HasComment("资质类型。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("integer")
|
||
.HasDefaultValue(100)
|
||
.HasComment("排序值。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店标识。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("ExpiresAt")
|
||
.HasFilter("\"ExpiresAt\" IS NOT NULL");
|
||
|
||
b.HasIndex("TenantId", "StoreId");
|
||
|
||
b.ToTable("store_qualifications", null, t =>
|
||
{
|
||
t.HasComment("门店资质证照。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StoreStaffTemplate", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<TimeSpan>("EveningEndTime")
|
||
.HasColumnType("interval")
|
||
.HasComment("晚班结束时间。");
|
||
|
||
b.Property<TimeSpan>("EveningStartTime")
|
||
.HasColumnType("interval")
|
||
.HasComment("晚班开始时间。");
|
||
|
||
b.Property<TimeSpan>("FullEndTime")
|
||
.HasColumnType("interval")
|
||
.HasComment("全天班结束时间。");
|
||
|
||
b.Property<TimeSpan>("FullStartTime")
|
||
.HasColumnType("interval")
|
||
.HasComment("全天班开始时间。");
|
||
|
||
b.Property<TimeSpan>("MorningEndTime")
|
||
.HasColumnType("interval")
|
||
.HasComment("早班结束时间。");
|
||
|
||
b.Property<TimeSpan>("MorningStartTime")
|
||
.HasColumnType("interval")
|
||
.HasComment("早班开始时间。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店 ID。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId")
|
||
.IsUnique();
|
||
|
||
b.ToTable("store_staff_templates", null, t =>
|
||
{
|
||
t.HasComment("门店员工班次模板。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StoreStaffWeeklySchedule", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<int>("DayOfWeek")
|
||
.HasColumnType("integer")
|
||
.HasComment("星期(0=周一,6=周日)。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<TimeSpan?>("EndTime")
|
||
.HasColumnType("interval")
|
||
.HasComment("结束时间(休息时为空)。");
|
||
|
||
b.Property<int>("ShiftType")
|
||
.HasColumnType("integer")
|
||
.HasComment("班次类型。");
|
||
|
||
b.Property<long>("StaffId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("员工 ID。");
|
||
|
||
b.Property<TimeSpan?>("StartTime")
|
||
.HasColumnType("interval")
|
||
.HasComment("开始时间(休息时为空)。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店 ID。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "DayOfWeek");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "StaffId", "DayOfWeek")
|
||
.IsUnique();
|
||
|
||
b.ToTable("store_staff_weekly_schedules", null, t =>
|
||
{
|
||
t.HasComment("门店员工每周排班。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StoreTable", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<long?>("AreaId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所在区域 ID。");
|
||
|
||
b.Property<int>("Capacity")
|
||
.HasColumnType("integer")
|
||
.HasComment("可容纳人数。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("QrCodeUrl")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("桌码二维码地址。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("当前桌台状态。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店标识。");
|
||
|
||
b.Property<string>("TableCode")
|
||
.IsRequired()
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("桌码。");
|
||
|
||
b.Property<string>("Tags")
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("桌台标签(堂食、快餐等)。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "TableCode")
|
||
.IsUnique();
|
||
|
||
b.ToTable("store_tables", null, t =>
|
||
{
|
||
t.HasComment("桌台信息与二维码绑定。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Stores.Entities.StoreTableArea", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("Description")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("区域描述。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("区域名称。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.HasColumnType("integer")
|
||
.HasComment("排序值。");
|
||
|
||
b.Property<long>("StoreId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("门店标识。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "StoreId", "Name")
|
||
.IsUnique();
|
||
|
||
b.ToTable("store_table_areas", null, t =>
|
||
{
|
||
t.HasComment("门店桌台区域配置。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Tenants.Entities.QuotaPackage", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("Description")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("描述。");
|
||
|
||
b.Property<bool>("IsActive")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否上架。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("配额包名称。");
|
||
|
||
b.Property<decimal>("Price")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("价格。");
|
||
|
||
b.Property<int>("QuotaType")
|
||
.HasColumnType("integer")
|
||
.HasComment("配额类型。");
|
||
|
||
b.Property<decimal>("QuotaValue")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("配额数值。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("integer")
|
||
.HasDefaultValue(0)
|
||
.HasComment("排序。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("QuotaType", "IsActive", "SortOrder");
|
||
|
||
b.ToTable("quota_packages", null, t =>
|
||
{
|
||
t.HasComment("配额包定义(系统提供的可购买配额包)。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Tenants.Entities.Tenant", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("Address")
|
||
.HasColumnType("text")
|
||
.HasComment("详细地址信息。");
|
||
|
||
b.Property<string>("City")
|
||
.HasColumnType("text")
|
||
.HasComment("所在城市。");
|
||
|
||
b.Property<string>("Code")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("租户短编码,作为跨系统引用的唯一标识。");
|
||
|
||
b.Property<string>("ContactEmail")
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("主联系人邮箱。");
|
||
|
||
b.Property<string>("ContactName")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("主联系人姓名。");
|
||
|
||
b.Property<string>("ContactPhone")
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("主联系人电话。");
|
||
|
||
b.Property<string>("Country")
|
||
.HasColumnType("text")
|
||
.HasComment("所在国家/地区。");
|
||
|
||
b.Property<string>("CoverImageUrl")
|
||
.HasColumnType("text")
|
||
.HasComment("品牌海报或封面图。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime?>("EffectiveFrom")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("服务生效时间(UTC)。");
|
||
|
||
b.Property<DateTime?>("EffectiveTo")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("服务到期时间(UTC)。");
|
||
|
||
b.Property<string>("GeoFailReason")
|
||
.HasMaxLength(500)
|
||
.HasColumnType("character varying(500)")
|
||
.HasComment("地理定位失败原因。");
|
||
|
||
b.Property<DateTime?>("GeoNextRetryAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("下次地理定位重试时间(UTC)。");
|
||
|
||
b.Property<int>("GeoRetryCount")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("integer")
|
||
.HasDefaultValue(0)
|
||
.HasComment("地理定位重试次数。");
|
||
|
||
b.Property<int>("GeoStatus")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("integer")
|
||
.HasDefaultValue(0)
|
||
.HasComment("地理定位状态。");
|
||
|
||
b.Property<DateTime?>("GeoUpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("地理定位最近成功时间(UTC)。");
|
||
|
||
b.Property<string>("Industry")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("所属行业,如餐饮、零售等。");
|
||
|
||
b.Property<double?>("Latitude")
|
||
.HasColumnType("double precision")
|
||
.HasComment("纬度信息。");
|
||
|
||
b.Property<string>("LegalEntityName")
|
||
.HasColumnType("text")
|
||
.HasComment("法人或公司主体名称。");
|
||
|
||
b.Property<string>("LogoUrl")
|
||
.HasColumnType("text")
|
||
.HasComment("LOGO 图片地址。");
|
||
|
||
b.Property<double?>("Longitude")
|
||
.HasColumnType("double precision")
|
||
.HasComment("经度信息。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("租户全称或品牌名称。");
|
||
|
||
b.Property<int?>("OperatingMode")
|
||
.HasColumnType("integer")
|
||
.HasComment("经营模式(同一主体/不同主体)。");
|
||
|
||
b.Property<long?>("PrimaryOwnerUserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("系统内对应的租户所有者账号 ID。");
|
||
|
||
b.Property<string>("Province")
|
||
.HasColumnType("text")
|
||
.HasComment("所在省份或州。");
|
||
|
||
b.Property<string>("Remarks")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("备注信息,用于运营记录特殊说明。");
|
||
|
||
b.Property<string>("ShortName")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("对外展示的简称。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("租户当前状态,涵盖审核、启用、停用等场景。");
|
||
|
||
b.Property<DateTime?>("SuspendedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次暂停服务时间。");
|
||
|
||
b.Property<string>("SuspensionReason")
|
||
.HasColumnType("text")
|
||
.HasComment("暂停或终止的原因说明。");
|
||
|
||
b.Property<string>("Tags")
|
||
.HasColumnType("text")
|
||
.HasComment("业务标签集合(逗号分隔)。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<string>("Website")
|
||
.HasColumnType("text")
|
||
.HasComment("官网或主要宣传链接。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("Code")
|
||
.IsUnique();
|
||
|
||
b.HasIndex("ContactPhone")
|
||
.IsUnique();
|
||
|
||
b.HasIndex("GeoStatus", "GeoNextRetryAt");
|
||
|
||
b.HasIndex("Longitude", "Latitude")
|
||
.HasFilter("\"Longitude\" IS NOT NULL AND \"Latitude\" IS NOT NULL");
|
||
|
||
b.ToTable("tenants", null, t =>
|
||
{
|
||
t.HasComment("租户信息,描述租户的生命周期与基础资料。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Tenants.Entities.TenantAnnouncement", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<int>("AnnouncementType")
|
||
.HasColumnType("integer")
|
||
.HasComment("公告类型。");
|
||
|
||
b.Property<string>("Content")
|
||
.IsRequired()
|
||
.HasColumnType("text")
|
||
.HasComment("公告正文(可为 Markdown/HTML,前端自行渲染)。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime>("EffectiveFrom")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("生效时间(UTC)。");
|
||
|
||
b.Property<DateTime?>("EffectiveTo")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("失效时间(UTC),为空表示长期有效。");
|
||
|
||
b.Property<bool>("IsActive")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否启用(已弃用,迁移期保留)。");
|
||
|
||
b.Property<int>("Priority")
|
||
.HasColumnType("integer")
|
||
.HasComment("展示优先级,数值越大越靠前。");
|
||
|
||
b.Property<DateTime?>("PublishedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("实际发布时间(UTC)。");
|
||
|
||
b.Property<int>("PublisherScope")
|
||
.HasColumnType("integer")
|
||
.HasComment("发布者范围。");
|
||
|
||
b.Property<long?>("PublisherUserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("发布者用户 ID(系统或租户后台账号)。");
|
||
|
||
b.Property<DateTime?>("RevokedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("撤销时间(UTC)。");
|
||
|
||
b.Property<byte[]>("RowVersion")
|
||
.IsConcurrencyToken()
|
||
.IsRequired()
|
||
.ValueGeneratedOnAddOrUpdate()
|
||
.HasColumnType("bytea")
|
||
.HasComment("并发控制字段。");
|
||
|
||
b.Property<DateTime?>("ScheduledPublishAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("预定发布时间(UTC)。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("公告状态。");
|
||
|
||
b.Property<string>("TargetParameters")
|
||
.HasColumnType("text")
|
||
.HasComment("目标受众参数(JSON)。");
|
||
|
||
b.Property<string>("TargetType")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("目标受众类型。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<string>("Title")
|
||
.IsRequired()
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("公告标题。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("Status", "EffectiveFrom")
|
||
.HasFilter("\"TenantId\" = 0");
|
||
|
||
b.HasIndex("TenantId", "AnnouncementType", "IsActive");
|
||
|
||
b.HasIndex("TenantId", "EffectiveFrom", "EffectiveTo");
|
||
|
||
b.HasIndex("TenantId", "Status", "EffectiveFrom");
|
||
|
||
b.ToTable("tenant_announcements", null, t =>
|
||
{
|
||
t.HasComment("租户公告。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Tenants.Entities.TenantAnnouncementRead", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<long>("AnnouncementId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("公告 ID。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime>("ReadAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("已读时间。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<long?>("UserId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("已读用户 ID(后台账号),为空表示租户级已读。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "AnnouncementId", "UserId")
|
||
.IsUnique();
|
||
|
||
b.ToTable("tenant_announcement_reads", null, t =>
|
||
{
|
||
t.HasComment("租户公告已读记录。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Tenants.Entities.TenantBillingStatement", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<decimal>("AmountDue")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("应付金额(原始金额)。");
|
||
|
||
b.Property<decimal>("AmountPaid")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("实付金额。");
|
||
|
||
b.Property<int>("BillingType")
|
||
.HasColumnType("integer")
|
||
.HasComment("账单类型(订阅账单/配额包账单/手动账单/续费账单)。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<string>("Currency")
|
||
.IsRequired()
|
||
.ValueGeneratedOnAdd()
|
||
.HasMaxLength(8)
|
||
.HasColumnType("character varying(8)")
|
||
.HasDefaultValue("CNY")
|
||
.HasComment("货币类型(默认 CNY)。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<decimal>("DiscountAmount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("折扣金额。");
|
||
|
||
b.Property<DateTime>("DueDate")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("到期日。");
|
||
|
||
b.Property<string>("LineItemsJson")
|
||
.HasColumnType("text")
|
||
.HasComment("账单明细 JSON,记录各项费用。");
|
||
|
||
b.Property<string>("Notes")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("备注信息(如:人工备注、取消原因等)。");
|
||
|
||
b.Property<DateTime?>("OverdueNotifiedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("逾期通知时间。");
|
||
|
||
b.Property<DateTime>("PeriodEnd")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("账单周期结束时间。");
|
||
|
||
b.Property<DateTime>("PeriodStart")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("账单周期开始时间。");
|
||
|
||
b.Property<DateTime?>("ReminderSentAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("提醒发送时间(续费提醒、逾期提醒等)。");
|
||
|
||
b.Property<string>("StatementNo")
|
||
.IsRequired()
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("账单编号,供对账查询。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("当前付款状态。");
|
||
|
||
b.Property<long?>("SubscriptionId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("关联的订阅 ID(仅当 BillingType 为 Subscription 或 Renewal 时有值)。");
|
||
|
||
b.Property<decimal>("TaxAmount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("税费金额。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("CreatedAt")
|
||
.HasDatabaseName("idx_billing_created_at");
|
||
|
||
b.HasIndex("Status", "DueDate")
|
||
.HasDatabaseName("idx_billing_status_duedate")
|
||
.HasFilter("\"Status\" IN (0, 2)");
|
||
|
||
b.HasIndex("TenantId", "StatementNo")
|
||
.IsUnique();
|
||
|
||
b.HasIndex("TenantId", "Status", "DueDate")
|
||
.HasDatabaseName("idx_billing_tenant_status_duedate");
|
||
|
||
b.ToTable("tenant_billing_statements", null, t =>
|
||
{
|
||
t.HasComment("租户账单,用于呈现周期性收费。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Tenants.Entities.TenantNotification", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<int>("Channel")
|
||
.HasColumnType("integer")
|
||
.HasComment("发布通道(站内、邮件、短信等)。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("Message")
|
||
.IsRequired()
|
||
.HasMaxLength(1024)
|
||
.HasColumnType("character varying(1024)")
|
||
.HasComment("通知正文。");
|
||
|
||
b.Property<string>("MetadataJson")
|
||
.HasColumnType("text")
|
||
.HasComment("附加元数据 JSON。");
|
||
|
||
b.Property<DateTime?>("ReadAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("租户是否已阅读。");
|
||
|
||
b.Property<DateTime>("SentAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("推送时间。");
|
||
|
||
b.Property<int>("Severity")
|
||
.HasColumnType("integer")
|
||
.HasComment("通知重要级别。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<string>("Title")
|
||
.IsRequired()
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("通知标题。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "Channel", "SentAt");
|
||
|
||
b.ToTable("tenant_notifications", null, t =>
|
||
{
|
||
t.HasComment("面向租户的站内通知或消息推送。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Tenants.Entities.TenantPackage", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("Description")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("套餐描述,包含适用场景、权益等。");
|
||
|
||
b.Property<string>("FeaturePoliciesJson")
|
||
.HasColumnType("text")
|
||
.HasComment("权益明细 JSON,记录自定义特性开关。");
|
||
|
||
b.Property<bool>("IsActive")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否仍启用(系统控制)。");
|
||
|
||
b.Property<bool>("IsAllowNewTenantPurchase")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("boolean")
|
||
.HasDefaultValue(true)
|
||
.HasComment("是否允许新租户购买/选择(仅影响新购)。");
|
||
|
||
b.Property<bool>("IsPublicVisible")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("boolean")
|
||
.HasDefaultValue(true)
|
||
.HasComment("是否对外可见(展示页/套餐列表可见性)。");
|
||
|
||
b.Property<bool>("IsRecommended")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("boolean")
|
||
.HasDefaultValue(false)
|
||
.HasComment("是否推荐展示(运营推荐标识)。");
|
||
|
||
b.Property<int?>("MaxAccountCount")
|
||
.HasColumnType("integer")
|
||
.HasComment("允许创建的最大账号数。");
|
||
|
||
b.Property<int?>("MaxDeliveryOrders")
|
||
.HasColumnType("integer")
|
||
.HasComment("每月可调用的配送单数量上限。");
|
||
|
||
b.Property<int?>("MaxSmsCredits")
|
||
.HasColumnType("integer")
|
||
.HasComment("每月短信额度上限。");
|
||
|
||
b.Property<int?>("MaxStorageGb")
|
||
.HasColumnType("integer")
|
||
.HasComment("存储容量上限(GB)。");
|
||
|
||
b.Property<int?>("MaxStoreCount")
|
||
.HasColumnType("integer")
|
||
.HasComment("允许的最大门店数。");
|
||
|
||
b.Property<decimal?>("MonthlyPrice")
|
||
.HasColumnType("numeric")
|
||
.HasComment("月付价格,单位:人民币元。");
|
||
|
||
b.Property<string>("Name")
|
||
.IsRequired()
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("套餐名称,展示给租户的简称。");
|
||
|
||
b.Property<int>("PackageType")
|
||
.HasColumnType("integer")
|
||
.HasComment("套餐分类(试用、标准、旗舰等)。");
|
||
|
||
b.Property<int>("PublishStatus")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("integer")
|
||
.HasDefaultValue(0)
|
||
.HasComment("发布状态:0=草稿,1=已发布。");
|
||
|
||
b.Property<int>("SortOrder")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("integer")
|
||
.HasDefaultValue(0)
|
||
.HasComment("展示排序,数值越小越靠前。");
|
||
|
||
b.PrimitiveCollection<string[]>("Tags")
|
||
.IsRequired()
|
||
.HasColumnType("text[]")
|
||
.HasComment("套餐标签(用于展示与对比页)。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<decimal?>("YearlyPrice")
|
||
.HasColumnType("numeric")
|
||
.HasComment("年付价格,单位:人民币元。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("IsActive", "SortOrder");
|
||
|
||
b.HasIndex("PublishStatus", "IsActive", "IsPublicVisible", "IsAllowNewTenantPurchase", "SortOrder");
|
||
|
||
b.ToTable("tenant_packages", null, t =>
|
||
{
|
||
t.HasComment("系统提供的租户套餐定义。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Tenants.Entities.TenantPayment", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<decimal>("Amount")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("支付金额。");
|
||
|
||
b.Property<long>("BillingStatementId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("关联的账单 ID。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<int>("Method")
|
||
.HasColumnType("integer")
|
||
.HasComment("支付方式。");
|
||
|
||
b.Property<string>("Notes")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("备注信息。");
|
||
|
||
b.Property<DateTime?>("PaidAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("支付时间。");
|
||
|
||
b.Property<string>("ProofUrl")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("支付凭证 URL。");
|
||
|
||
b.Property<string>("RefundReason")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("退款原因。");
|
||
|
||
b.Property<DateTime?>("RefundedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("退款时间。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("支付状态。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<string>("TransactionNo")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("交易号。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("VerifiedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("审核时间。");
|
||
|
||
b.Property<long?>("VerifiedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("审核人 ID(管理员)。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TransactionNo")
|
||
.HasDatabaseName("idx_payment_transaction_no")
|
||
.HasFilter("\"TransactionNo\" IS NOT NULL");
|
||
|
||
b.HasIndex("BillingStatementId", "PaidAt")
|
||
.HasDatabaseName("idx_payment_billing_paidat");
|
||
|
||
b.HasIndex("TenantId", "BillingStatementId");
|
||
|
||
b.ToTable("tenant_payments", null, t =>
|
||
{
|
||
t.HasComment("租户支付记录。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Tenants.Entities.TenantQuotaPackagePurchase", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime?>("ExpiredAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("过期时间(可选)。");
|
||
|
||
b.Property<string>("Notes")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("备注。");
|
||
|
||
b.Property<decimal>("Price")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("购买价格。");
|
||
|
||
b.Property<DateTime>("PurchasedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("购买时间。");
|
||
|
||
b.Property<long>("QuotaPackageId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("配额包 ID。");
|
||
|
||
b.Property<decimal>("QuotaValue")
|
||
.HasPrecision(18, 2)
|
||
.HasColumnType("numeric(18,2)")
|
||
.HasComment("购买时的配额值。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "QuotaPackageId", "PurchasedAt");
|
||
|
||
b.ToTable("tenant_quota_package_purchases", null, t =>
|
||
{
|
||
t.HasComment("租户配额包购买记录。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Tenants.Entities.TenantQuotaUsage", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime?>("LastResetAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次重置时间。");
|
||
|
||
b.Property<decimal>("LimitValue")
|
||
.HasColumnType("numeric")
|
||
.HasComment("当前配额上限。");
|
||
|
||
b.Property<int>("QuotaType")
|
||
.HasColumnType("integer")
|
||
.HasComment("配额类型,例如门店数、短信条数等。");
|
||
|
||
b.Property<string>("ResetCycle")
|
||
.HasColumnType("text")
|
||
.HasComment("配额刷新周期描述(如月、年)。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<decimal>("UsedValue")
|
||
.HasColumnType("numeric")
|
||
.HasComment("已消耗的数量。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "QuotaType")
|
||
.IsUnique();
|
||
|
||
b.ToTable("tenant_quota_usages", null, t =>
|
||
{
|
||
t.HasComment("租户配额使用情况快照。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Tenants.Entities.TenantQuotaUsageHistory", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<decimal?>("ChangeAmount")
|
||
.HasColumnType("numeric")
|
||
.HasComment("变更量(可选)。");
|
||
|
||
b.Property<string>("ChangeReason")
|
||
.HasMaxLength(256)
|
||
.HasColumnType("character varying(256)")
|
||
.HasComment("变更原因(可选)。");
|
||
|
||
b.Property<int>("ChangeType")
|
||
.HasColumnType("integer")
|
||
.HasComment("变更类型。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<decimal>("LimitValue")
|
||
.HasColumnType("numeric")
|
||
.HasComment("限额值(记录时刻的快照)。");
|
||
|
||
b.Property<int>("QuotaType")
|
||
.HasColumnType("integer")
|
||
.HasComment("配额类型。");
|
||
|
||
b.Property<DateTime>("RecordedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("记录时间(UTC)。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<decimal>("UsedValue")
|
||
.HasColumnType("numeric")
|
||
.HasComment("已使用值(记录时刻的快照)。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "RecordedAt");
|
||
|
||
b.HasIndex("TenantId", "QuotaType", "RecordedAt");
|
||
|
||
b.ToTable("tenant_quota_usage_histories", null, t =>
|
||
{
|
||
t.HasComment("租户配额使用历史记录(用于追踪配额上下限与使用量的时间序列变化)。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Tenants.Entities.TenantSubscription", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<bool>("AutoRenew")
|
||
.HasColumnType("boolean")
|
||
.HasComment("是否开启自动续费。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime>("EffectiveFrom")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("订阅生效时间(UTC)。");
|
||
|
||
b.Property<DateTime>("EffectiveTo")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("订阅到期时间(UTC)。");
|
||
|
||
b.Property<DateTime?>("NextBillingDate")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("下一个计费时间,配合自动续费使用。");
|
||
|
||
b.Property<string>("Notes")
|
||
.HasColumnType("text")
|
||
.HasComment("运营备注信息。");
|
||
|
||
b.Property<long?>("ScheduledPackageId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("若已排期升降配,对应的新套餐 ID。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("订阅当前状态。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<long>("TenantPackageId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("当前订阅关联的套餐标识。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "TenantPackageId");
|
||
|
||
b.ToTable("tenant_subscriptions", null, t =>
|
||
{
|
||
t.HasComment("租户套餐订阅记录。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Tenants.Entities.TenantSubscriptionHistory", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<decimal?>("Amount")
|
||
.HasColumnType("numeric")
|
||
.HasComment("相关费用。");
|
||
|
||
b.Property<int>("ChangeType")
|
||
.HasColumnType("integer")
|
||
.HasComment("变更类型。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<string>("Currency")
|
||
.HasMaxLength(8)
|
||
.HasColumnType("character varying(8)")
|
||
.HasComment("币种。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<DateTime>("EffectiveFrom")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("生效时间。");
|
||
|
||
b.Property<DateTime>("EffectiveTo")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("到期时间。");
|
||
|
||
b.Property<long>("FromPackageId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("原套餐 ID。");
|
||
|
||
b.Property<string>("Notes")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("备注。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("租户标识。");
|
||
|
||
b.Property<long>("TenantSubscriptionId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("对应的订阅 ID。");
|
||
|
||
b.Property<long>("ToPackageId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("新套餐 ID。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId", "TenantSubscriptionId");
|
||
|
||
b.ToTable("tenant_subscription_histories", null, t =>
|
||
{
|
||
t.HasComment("租户套餐订阅变更记录。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Tenants.Entities.TenantVerificationProfile", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.Property<string>("AdditionalDataJson")
|
||
.HasColumnType("text")
|
||
.HasComment("附加资料(JSON)。");
|
||
|
||
b.Property<string>("AlipayPid")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("支付宝 PID。");
|
||
|
||
b.Property<string>("BankAccountName")
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("开户名。");
|
||
|
||
b.Property<string>("BankAccountNumber")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("银行账号。");
|
||
|
||
b.Property<string>("BankName")
|
||
.HasMaxLength(128)
|
||
.HasColumnType("character varying(128)")
|
||
.HasComment("银行名称。");
|
||
|
||
b.Property<string>("BusinessLicenseNumber")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("营业执照编号。");
|
||
|
||
b.Property<string>("BusinessLicenseUrl")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("营业执照文件地址。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.Property<string>("LegalPersonIdBackUrl")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("法人身份证反面。");
|
||
|
||
b.Property<string>("LegalPersonIdFrontUrl")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("法人身份证正面。");
|
||
|
||
b.Property<string>("LegalPersonIdNumber")
|
||
.HasMaxLength(32)
|
||
.HasColumnType("character varying(32)")
|
||
.HasComment("法人身份证号。");
|
||
|
||
b.Property<string>("LegalPersonName")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("法人姓名。");
|
||
|
||
b.Property<string>("ReviewRemarks")
|
||
.HasMaxLength(512)
|
||
.HasColumnType("character varying(512)")
|
||
.HasComment("审核备注。");
|
||
|
||
b.Property<DateTime?>("ReviewedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("审核时间。");
|
||
|
||
b.Property<long?>("ReviewedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("审核人 ID。");
|
||
|
||
b.Property<string>("ReviewedByName")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("审核人姓名。");
|
||
|
||
b.Property<int>("Status")
|
||
.HasColumnType("integer")
|
||
.HasComment("实名状态。");
|
||
|
||
b.Property<DateTime?>("SubmittedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("提交时间。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("对应的租户标识。");
|
||
|
||
b.Property<DateTime?>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long?>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<string>("WeChatMerchantNo")
|
||
.HasMaxLength(64)
|
||
.HasColumnType("character varying(64)")
|
||
.HasComment("微信商户号。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId")
|
||
.IsUnique();
|
||
|
||
b.ToTable("tenant_verification_profiles", null, t =>
|
||
{
|
||
t.HasComment("租户实名认证资料。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Tenants.Entities.TenantVisibilityRoleRule", b =>
|
||
{
|
||
b.Property<long>("Id")
|
||
.ValueGeneratedOnAdd()
|
||
.HasColumnType("bigint")
|
||
.HasComment("实体唯一标识。");
|
||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||
|
||
b.PrimitiveCollection<string[]>("BillingVisibleRoleCodes")
|
||
.IsRequired()
|
||
.HasColumnType("text[]")
|
||
.HasComment("账单可见角色编码集合。");
|
||
|
||
b.Property<DateTime>("CreatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("创建时间(UTC)。");
|
||
|
||
b.Property<long?>("CreatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("创建人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.Property<DateTime?>("DeletedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("软删除时间(UTC),未删除时为 null。");
|
||
|
||
b.Property<long?>("DeletedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("删除人用户标识(软删除),未删除时为 null。");
|
||
|
||
b.PrimitiveCollection<string[]>("QuotaVisibleRoleCodes")
|
||
.IsRequired()
|
||
.HasColumnType("text[]")
|
||
.HasComment("配额可见角色编码集合。");
|
||
|
||
b.Property<long>("TenantId")
|
||
.HasColumnType("bigint")
|
||
.HasComment("所属租户 ID。");
|
||
|
||
b.Property<DateTime>("UpdatedAt")
|
||
.HasColumnType("timestamp with time zone")
|
||
.HasComment("最近一次更新时间(UTC),从未更新时为 null。");
|
||
|
||
b.Property<long>("UpdatedBy")
|
||
.HasColumnType("bigint")
|
||
.HasComment("最后更新人用户标识,匿名或系统操作时为 null。");
|
||
|
||
b.HasKey("Id");
|
||
|
||
b.HasIndex("TenantId")
|
||
.IsUnique();
|
||
|
||
b.ToTable("tenant_visibility_role_rules", null, t =>
|
||
{
|
||
t.HasComment("租户账单/配额可见角色规则。");
|
||
});
|
||
});
|
||
|
||
modelBuilder.Entity("MassTransit.EntityFrameworkCoreIntegration.OutboxMessage", b =>
|
||
{
|
||
b.HasOne("MassTransit.EntityFrameworkCoreIntegration.OutboxState", null)
|
||
.WithMany()
|
||
.HasForeignKey("OutboxId");
|
||
|
||
b.HasOne("MassTransit.EntityFrameworkCoreIntegration.InboxState", null)
|
||
.WithMany()
|
||
.HasForeignKey("InboxMessageId", "InboxConsumerId")
|
||
.HasPrincipalKey("MessageId", "ConsumerId");
|
||
});
|
||
|
||
modelBuilder.Entity("TakeoutSaaS.Domain.Orders.Entities.OrderItem", b =>
|
||
{
|
||
b.HasOne("TakeoutSaaS.Domain.Orders.Entities.Order", null)
|
||
.WithMany()
|
||
.HasForeignKey("OrderId")
|
||
.OnDelete(DeleteBehavior.Cascade)
|
||
.IsRequired();
|
||
});
|
||
#pragma warning restore 612, 618
|
||
}
|
||
}
|
||
}
|