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