using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Atomx.Common.Entities
{
///
/// 自有商城或平台网点的商品列表。
///
[Table("ProductListings")]
public class ProductListing
{
///
/// 产品ID
///
[DatabaseGenerated(DatabaseGeneratedOption.None)]
[Key]
public long Id { get; set; }
///
/// 基础产品信息
///
public long ProductId { get; set; }
///
/// 发布的企业用户ID
///
public long CorporationStaffId { get; set; }
///
/// 归属公司ID
///
public long CorporationId { get; set; }
///
/// 平台ID,1自有商城,2淘宝,3天猫,4京东,5拼多多,6抖音,7快手,8小红书等
///
public int PlatformId { get; set; }
///
/// 卖家店铺ID
///
public long StoreId { get; set; }
///
/// 产品类型ID
///
public long ProductTypeId { get; set; }
///
/// SEO Title
///
[Column(TypeName = "varchar(256)")]
public string MetaTitle { get; set; } = string.Empty;
///
/// SEO Description
///
[Column(TypeName = "varchar(512)")]
public string MetaDescription { get; set; } = string.Empty;
///
/// 产品Slug
///
public string Slug { get; set; } = string.Empty;
///
/// 产品特点标签
///
[Column(TypeName = "varchar(100)")]
public string? Tags { get; set; } = string.Empty;
///
/// 产品详细介绍
///
[Column(TypeName = "text")]
public string Body { get; set; } = string.Empty;
///
/// 订单最小数量
///
public int OrderMinimumQuantity { get; set; }
///
/// 订单最多数量
///
public int OrderMaximumQuantity { get; set; }
///
/// 是否允许退货
///
public bool AllowReturn { get; set; }
///
/// 是否允许换货
///
public bool AllowExchange { get; set; }
///
/// 是否独立发货
///
public bool SingleShip { get; set; }
///
/// 预计运输天数
///
public int ShippingDays { get; set; }
///
/// 运费模板ID
///
public long ShippingId { get; set; }
///
/// 精选
///
public bool IsFeatured { get; set; }
///
/// 是否 best
///
public bool IsBest { get; set; }
///
/// 是否标注新品
///
public bool IsNew { get; set; }
///
/// 暂停销售,前台处理成已售罄
///
public bool StopSales { get; set; }
///
/// 产品信息审核状态
///
public int ReviewStatus { get; set; }
///
/// 商品库存
///
public int StockQuantity { get; set; }
///
/// 总销售数量
///
public int SalesQuantity { get; set; }
///
/// 评分
///
public double Ratings { get; set; }
///
/// 5颗星
///
public int FiveStars { get; set; }
///
/// 4课星
///
public int FourStars { get; set; }
///
/// 三颗星
///
public int ThreeStars { get; set; }
///
/// 两颗星
///
public int TwoStars { get; set; }
///
/// 一颗星
///
public int OneStars { get; set; }
///
/// 评论数量
///
public int ReviewsCount { get; set; }
///
/// 总浏览次数
///
public int ViewsCount { get; set; }
///
/// 产品状态,0未上架,1上架
///
public int Status { get; set; }
///
/// 是否逻辑删除
///
public bool Deleted { get; set; }
///
/// 删除时间
///
[Column(TypeName = "timestamptz")]
public DateTime? DeletedTime { get; set; }
///
/// 创建时间
///
[Column(TypeName = "timestamptz")]
public DateTime CreateTime { get; set; }
///
/// 更新时间
///
[Column(TypeName = "timestamptz")]
public DateTime? UpdateTime { get; set; }
}
}