using System; using System.Collections.Generic; using System.Linq; using System.Text.Json.Serialization; using SqlSugar; using Yi.Framework.Model.Base; namespace Yi.Framework.Model.SHOP.Entitys { /// /// Spu表 /// [SugarTable("Spu")] public partial class SpuEntity : IBaseModelEntity { public SpuEntity() { CreateTime = DateTime.Now; } [JsonConverter(typeof(ValueToStringConverter))] [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)] public long Id { get; set; } /// /// 商品分类Id /// [SugarColumn(ColumnName = "CategoryId")] public long? CategoryId { get; set; } /// /// 商品名称 /// [SugarColumn(ColumnName = "SpuName")] public string? SpuName { get; set; } /// /// 商品详情 /// [SugarColumn(ColumnName = "Details")] public string? Details { get; set; } /// /// 商品价格 /// [SugarColumn(ColumnName = "Price")] public string? Price { get; set; } /// /// 创建者 /// [SugarColumn(ColumnName = "CreateUser")] public long? CreateUser { get; set; } /// /// 创建时间 /// [SugarColumn(ColumnName = "CreateTime")] public DateTime? CreateTime { get; set; } /// /// 修改者 /// [SugarColumn(ColumnName = "ModifyUser")] public long? ModifyUser { get; set; } /// /// 修改时间 /// [SugarColumn(ColumnName = "ModifyTime")] public DateTime? ModifyTime { get; set; } /// /// 是否删除 /// [SugarColumn(ColumnName = "IsDeleted")] public bool? IsDeleted { get; set; } /// /// 租户Id /// [SugarColumn(ColumnName = "TenantId")] public long? TenantId { get; set; } /// /// 排序字段 /// [SugarColumn(ColumnName = "OrderNum")] public int? OrderNum { get; set; } /// /// 描述 /// [SugarColumn(ColumnName = "Remark")] public string? Remark { get; set; } /// /// 规格Spu完整信息 /// [SugarColumn(ColumnName = "SpecsAllInfo", IsJson = true)] public List? SpecsSpuAllInfo { get; set; } /// /// 规格Spu信息 /// [SugarColumn(ColumnName = "SpecsInfo", IsJson = true)] public List? SpecsSpuInfo { get; set; } [Navigate(NavigateType.OneToMany, nameof(SkuEntity.SpuId))] public List? Skus { get; set; } } public class SpecsSpuAllInfoModel { public string? SpecsGroupName { get; set; } public List? SpecsNames { get; set; } } public class SpecsSpuInfoModel { public long? SpecsGroupId { get; set; } public List? SpecsIds { get; set; } } }