using FreeSql.DataAnnotations; using System.Text.Json.Serialization; namespace Store.Modules.CloudProduct.Entities { /// /// 商品表实体(对应数据库表 goods) /// [Table(Name = "goods")] public class GoodsEntity { /// /// 自增ID /// [Column(IsPrimary = true, IsIdentity = true)] [JsonIgnore] public long Id { get; set; } /// /// 平台类型 /// 1 PDD /// [Column(IsNullable = false)] public byte Platform { get; set; } /// /// 商品编号 /// [Column(Name = "goods_id", IsNullable = false)] public long GoodsId { get; set; } /// /// 标题 /// [Column(Name = "title", IsNullable = false, StringLength = 500)] public string Title { get; set; } = string.Empty; /// /// 描述 /// [Column(Name = "description", IsNullable = true)] public string? Description { get; set; } /// /// 缩略图 /// [Column(Name = "thumb_url", IsNullable = true, StringLength = 512)] public string? ThumbUrl { get; set; } /// /// 一级类目ID /// [Column(Name = "cat_id_1", IsNullable = true)] public int? CatId1 { get; set; } /// /// 二级类目ID /// [Column(Name = "cat_id_2", IsNullable = true)] public int? CatId2 { get; set; } /// /// 三级类目ID /// [Column(Name = "cat_id_3", IsNullable = true)] public int? CatId3 { get; set; } /// /// 四级类目ID /// [Column(Name = "cat_id_4", IsNullable = true)] public int? CatId4 { get; set; } /// /// 最低价快照(元),导入时计算 /// [Column(Name = "min_price")] public long? MinPrice { get; set; } /// /// 最高价快照(元),导入时计算 /// [Column(Name = "max_price")] public long? MaxPrice { get; set; } /// /// 销量 /// [Column(Name = "sold_quantity", IsNullable = false)] public int SoldQuantity { get; set; } /// /// 状态:0正常 1已删除 /// [Column(IsNullable = false)] [JsonIgnore] public byte Status { get; set; } /// /// 创建时间 /// [Column(Name = "createdTime", IsNullable = false, ServerTime = DateTimeKind.Utc)] [JsonIgnore] public DateTime CreatedTime { get; set; } /// /// 更新时间(自动更新) /// [Column(Name = "updatedTime", IsNullable = false, ServerTime = DateTimeKind.Utc)] [JsonIgnore] public DateTime UpdatedTime { get; set; } /// /// 是否已分词:0未 1已 /// [Column(Name = "is_segmented", IsNullable = false)] [JsonIgnore] public byte IsSegmented { get; set; } } }