Project.Fengling.QoderVersion/Backend/src/Fengling.Backend.Infrastructure/Migrations/ApplicationDbContextModelSnapshot.cs
sam e24925e1ed chore(build): 添加基础构建配置和版本管理
- 新增 .dockerignore 文件,忽略多种临时及中间文件
- 新增 .gitattributes 文件,配置文本文件换行及合并行为
- 新增详细的 .gitignore 文件,排除多种开发及生成文件
- 新增 VS Code C# 代码片段,提升开发效率
- 添加 Directory.Build.props,统一 MSBuild 配置和代码分析规则
- 添加空的 Directory.Build.targets,预留构建任务扩展位置
- 添加 Directory.Packages.props,实现依赖包版本集中管理和声明
2026-02-11 12:58:54 +08:00

597 lines
23 KiB
C#

// <auto-generated />
using System;
using Fengling.Backend.Infrastructure;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Fengling.Backend.Infrastructure.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
partial class ApplicationDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "9.0.0");
modelBuilder.Entity("Fengling.Backend.Domain.AggregatesModel.GiftAggregate.Gift", b =>
{
b.Property<Guid>("Id")
.HasColumnType("TEXT")
.HasComment("礼品ID");
b.Property<int>("AvailableStock")
.HasColumnType("INTEGER")
.HasComment("可用库存");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT")
.HasComment("创建时间");
b.Property<bool>("Deleted")
.HasColumnType("INTEGER");
b.Property<string>("Description")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT")
.HasComment("描述");
b.Property<string>("ImageUrl")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT")
.HasComment("图片URL");
b.Property<bool>("IsOnShelf")
.HasColumnType("INTEGER")
.HasComment("是否上架");
b.Property<int?>("LimitPerMember")
.HasColumnType("INTEGER")
.HasComment("每人限兑数量");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT")
.HasComment("礼品名称");
b.Property<int>("RequiredPoints")
.HasColumnType("INTEGER")
.HasComment("所需积分");
b.Property<int>("RowVersion")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.Property<int>("SortOrder")
.HasColumnType("INTEGER")
.HasComment("排序");
b.Property<int>("TotalStock")
.HasColumnType("INTEGER")
.HasComment("总库存");
b.Property<int>("Type")
.HasColumnType("INTEGER")
.HasComment("礼品类型(1:实物,2:虚拟,3:自有产品)");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("TEXT")
.HasComment("更新时间");
b.HasKey("Id");
b.HasIndex("IsOnShelf")
.HasDatabaseName("IX_Gifts_IsOnShelf");
b.HasIndex("SortOrder")
.HasDatabaseName("IX_Gifts_SortOrder");
b.HasIndex("Type")
.HasDatabaseName("IX_Gifts_Type");
b.ToTable("Gifts", (string)null);
});
modelBuilder.Entity("Fengling.Backend.Domain.AggregatesModel.MarketingCodeAggregate.MarketingCode", b =>
{
b.Property<Guid>("Id")
.HasColumnType("TEXT")
.HasComment("营销码ID");
b.Property<string>("BatchNo")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT")
.HasComment("批次号");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT")
.HasComment("营销码");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT")
.HasComment("创建时间");
b.Property<bool>("Deleted")
.HasColumnType("INTEGER");
b.Property<DateTime?>("ExpiryDate")
.HasColumnType("TEXT")
.HasComment("过期时间");
b.Property<bool>("IsUsed")
.HasColumnType("INTEGER")
.HasComment("是否已使用");
b.Property<int>("RowVersion")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.Property<DateTime?>("UsedAt")
.HasColumnType("TEXT")
.HasComment("使用时间");
b.Property<Guid?>("UsedByMemberId")
.HasColumnType("TEXT")
.HasComment("使用者会员ID");
b.HasKey("Id");
b.HasIndex("BatchNo")
.HasDatabaseName("IX_MarketingCodes_BatchNo");
b.HasIndex("Code")
.IsUnique()
.HasDatabaseName("IX_MarketingCodes_Code");
b.HasIndex("IsUsed")
.HasDatabaseName("IX_MarketingCodes_IsUsed");
b.ToTable("MarketingCodes", (string)null);
});
modelBuilder.Entity("Fengling.Backend.Domain.AggregatesModel.MemberAggregate.Member", b =>
{
b.Property<Guid>("Id")
.HasColumnType("TEXT")
.HasComment("会员ID");
b.Property<int>("AvailablePoints")
.HasColumnType("INTEGER")
.HasComment("可用积分");
b.Property<bool>("Deleted")
.HasColumnType("INTEGER");
b.Property<string>("Nickname")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT")
.HasComment("昵称");
b.Property<string>("Password")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT")
.HasComment("密码(已加密)");
b.Property<string>("Phone")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("TEXT")
.HasComment("手机号");
b.Property<DateTime>("RegisteredAt")
.HasColumnType("TEXT")
.HasComment("注册时间");
b.Property<int>("RowVersion")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.Property<int>("Status")
.HasColumnType("INTEGER")
.HasComment("状态(1:正常,2:禁用)");
b.Property<int>("TotalPoints")
.HasColumnType("INTEGER")
.HasComment("累计总积分");
b.HasKey("Id");
b.HasIndex("Phone")
.IsUnique()
.HasDatabaseName("IX_Members_Phone");
b.HasIndex("Status")
.HasDatabaseName("IX_Members_Status");
b.ToTable("Members", (string)null);
});
modelBuilder.Entity("Fengling.Backend.Domain.AggregatesModel.PointsRuleAggregate.PointsRule", b =>
{
b.Property<Guid>("Id")
.HasColumnType("TEXT")
.HasComment("积分规则ID");
b.Property<decimal>("BonusMultiplier")
.HasColumnType("TEXT")
.HasComment("奖励倍数");
b.Property<Guid?>("CategoryId")
.HasColumnType("TEXT")
.HasComment("品类ID");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT")
.HasComment("创建时间");
b.Property<bool>("Deleted")
.HasColumnType("INTEGER");
b.Property<DateTime?>("EndDate")
.HasColumnType("TEXT")
.HasComment("生效结束时间");
b.Property<bool>("IsActive")
.HasColumnType("INTEGER")
.HasComment("是否激活");
b.Property<string>("MemberLevelCode")
.HasMaxLength(20)
.HasColumnType("TEXT")
.HasComment("会员等级编码");
b.Property<int>("PointsValue")
.HasColumnType("INTEGER")
.HasComment("积分值");
b.Property<Guid?>("ProductId")
.HasColumnType("TEXT")
.HasComment("产品ID");
b.Property<int>("RowVersion")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.Property<string>("RuleName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT")
.HasComment("规则名称");
b.Property<int>("RuleType")
.HasColumnType("INTEGER")
.HasComment("规则类型(1:产品,2:时间,3:会员等级)");
b.Property<DateTime>("StartDate")
.HasColumnType("TEXT")
.HasComment("生效开始时间");
b.HasKey("Id");
b.HasIndex("IsActive")
.HasDatabaseName("IX_PointsRules_IsActive");
b.HasIndex("MemberLevelCode")
.HasDatabaseName("IX_PointsRules_MemberLevelCode");
b.HasIndex("ProductId")
.HasDatabaseName("IX_PointsRules_ProductId");
b.HasIndex("StartDate", "EndDate")
.HasDatabaseName("IX_PointsRules_DateRange");
b.ToTable("PointsRules", (string)null);
});
modelBuilder.Entity("Fengling.Backend.Domain.AggregatesModel.PointsTransactionAggregate.PointsTransaction", b =>
{
b.Property<Guid>("Id")
.HasColumnType("TEXT")
.HasComment("积分流水ID");
b.Property<int>("Amount")
.HasColumnType("INTEGER")
.HasComment("积分数量");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT")
.HasComment("创建时间");
b.Property<bool>("Deleted")
.HasColumnType("INTEGER");
b.Property<DateTime?>("ExpiryDate")
.HasColumnType("TEXT")
.HasComment("过期时间");
b.Property<Guid>("MemberId")
.HasColumnType("TEXT")
.HasComment("会员ID");
b.Property<string>("Reason")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT")
.HasComment("原因描述");
b.Property<Guid>("RelatedId")
.HasColumnType("TEXT")
.HasComment("关联ID");
b.Property<int>("RowVersion")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.Property<string>("Source")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT")
.HasComment("来源");
b.Property<int>("Type")
.HasColumnType("INTEGER")
.HasComment("交易类型(1:获得,2:消费,3:过期,4:退还)");
b.HasKey("Id");
b.HasIndex("CreatedAt")
.HasDatabaseName("IX_PointsTransactions_CreatedAt");
b.HasIndex("MemberId")
.HasDatabaseName("IX_PointsTransactions_MemberId");
b.HasIndex("RelatedId")
.IsUnique()
.HasDatabaseName("IX_PointsTransactions_RelatedId");
b.HasIndex("Type")
.HasDatabaseName("IX_PointsTransactions_Type");
b.ToTable("PointsTransactions", (string)null);
});
modelBuilder.Entity("Fengling.Backend.Domain.AggregatesModel.RedemptionOrderAggregate.RedemptionOrder", b =>
{
b.Property<Guid>("Id")
.HasColumnType("TEXT")
.HasComment("兑换订单ID");
b.Property<string>("CancelReason")
.HasMaxLength(500)
.HasColumnType("TEXT")
.HasComment("取消原因");
b.Property<int>("ConsumedPoints")
.HasColumnType("INTEGER")
.HasComment("消耗积分");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT")
.HasComment("创建时间");
b.Property<bool>("Deleted")
.HasColumnType("INTEGER");
b.Property<Guid>("GiftId")
.HasColumnType("TEXT")
.HasComment("礼品ID");
b.Property<string>("GiftName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT")
.HasComment("礼品名称");
b.Property<int>("GiftType")
.HasColumnType("INTEGER")
.HasComment("礼品类型");
b.Property<Guid>("MemberId")
.HasColumnType("TEXT")
.HasComment("会员ID");
b.Property<string>("OrderNo")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT")
.HasComment("订单号");
b.Property<int>("Quantity")
.HasColumnType("INTEGER")
.HasComment("数量");
b.Property<int>("RowVersion")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.Property<int>("Status")
.HasColumnType("INTEGER")
.HasComment("订单状态(1:待处理,2:已发货,3:已送达,4:已完成,5:已取消)");
b.Property<string>("TrackingNo")
.HasMaxLength(100)
.HasColumnType("TEXT")
.HasComment("物流单号");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("TEXT")
.HasComment("更新时间");
b.HasKey("Id");
b.HasIndex("CreatedAt")
.HasDatabaseName("IX_RedemptionOrders_CreatedAt");
b.HasIndex("MemberId")
.HasDatabaseName("IX_RedemptionOrders_MemberId");
b.HasIndex("OrderNo")
.IsUnique()
.HasDatabaseName("IX_RedemptionOrders_OrderNo");
b.HasIndex("Status")
.HasDatabaseName("IX_RedemptionOrders_Status");
b.ToTable("RedemptionOrders", (string)null);
});
modelBuilder.Entity("Fengling.Backend.Domain.AggregatesModel.MarketingCodeAggregate.MarketingCode", b =>
{
b.OwnsOne("Fengling.Backend.Domain.AggregatesModel.MarketingCodeAggregate.ProductInfo", "ProductInfo", b1 =>
{
b1.Property<Guid>("MarketingCodeId")
.HasColumnType("TEXT");
b1.Property<Guid?>("CategoryId")
.HasColumnType("TEXT")
.HasColumnName("CategoryId")
.HasComment("品类ID");
b1.Property<string>("CategoryName")
.HasMaxLength(100)
.HasColumnType("TEXT")
.HasColumnName("CategoryName")
.HasComment("品类名称");
b1.Property<Guid>("ProductId")
.HasColumnType("TEXT")
.HasColumnName("ProductId")
.HasComment("产品ID");
b1.Property<string>("ProductName")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("TEXT")
.HasColumnName("ProductName")
.HasComment("产品名称");
b1.HasKey("MarketingCodeId");
b1.ToTable("MarketingCodes");
b1.WithOwner()
.HasForeignKey("MarketingCodeId");
});
b.Navigation("ProductInfo")
.IsRequired();
});
modelBuilder.Entity("Fengling.Backend.Domain.AggregatesModel.MemberAggregate.Member", b =>
{
b.OwnsOne("Fengling.Backend.Domain.AggregatesModel.MemberAggregate.MemberLevel", "Level", b1 =>
{
b1.Property<Guid>("MemberId")
.HasColumnType("TEXT");
b1.Property<decimal>("BonusRate")
.HasColumnType("TEXT")
.HasColumnName("BonusRate")
.HasComment("积分奖励倍率");
b1.Property<string>("LevelCode")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("TEXT")
.HasColumnName("LevelCode")
.HasComment("等级编码");
b1.Property<string>("LevelName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT")
.HasColumnName("LevelName")
.HasComment("等级名称");
b1.Property<int>("RequiredPoints")
.HasColumnType("INTEGER")
.HasColumnName("RequiredPoints")
.HasComment("所需积分");
b1.HasKey("MemberId");
b1.ToTable("Members");
b1.WithOwner()
.HasForeignKey("MemberId");
});
b.Navigation("Level")
.IsRequired();
});
modelBuilder.Entity("Fengling.Backend.Domain.AggregatesModel.RedemptionOrderAggregate.RedemptionOrder", b =>
{
b.OwnsOne("Fengling.Backend.Domain.AggregatesModel.RedemptionOrderAggregate.Address", "ShippingAddress", b1 =>
{
b1.Property<Guid>("RedemptionOrderId")
.HasColumnType("TEXT");
b1.Property<string>("City")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT")
.HasColumnName("City")
.HasComment("市");
b1.Property<string>("DetailAddress")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT")
.HasColumnName("DetailAddress")
.HasComment("详细地址");
b1.Property<string>("District")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT")
.HasColumnName("District")
.HasComment("区/县");
b1.Property<string>("Phone")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("TEXT")
.HasColumnName("ReceiverPhone")
.HasComment("联系电话");
b1.Property<string>("Province")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT")
.HasColumnName("Province")
.HasComment("省");
b1.Property<string>("ReceiverName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("TEXT")
.HasColumnName("ReceiverName")
.HasComment("收货人姓名");
b1.HasKey("RedemptionOrderId");
b1.ToTable("RedemptionOrders");
b1.WithOwner()
.HasForeignKey("RedemptionOrderId");
});
b.Navigation("ShippingAddress");
});
#pragma warning restore 612, 618
}
}
}