Files
2026-11-06 19:25:36 +08:00

47 lines
1.3 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using FreeSql.DataAnnotations;
using System.Text.Json.Serialization;
namespace Store.Modules.CloudProduct.Entities
{
/// <summary>
/// 用户收藏商品表实体(对应数据库表 user_goods_favorites)
/// </summary>
[Table(Name = "user_goods_favorites")]
public class UserGoodsFavoriteEntity
{
/// <summary>
/// 自增主键
/// </summary>
[Column(Name = "id", IsPrimary = true, IsIdentity = true)]
[JsonIgnore]
public long Id { get; set; }
/// <summary>
/// 用户名(同一用户不能重复收藏同一商品)
/// </summary>
[Column(Name = "user_name", IsNullable = false, StringLength = 50)]
public string UserName { get; set; } = string.Empty;
/// <summary>
/// 收藏分组ID(0 表示默认分组),对应 user_goods_favorites_group.id
/// </summary>
[Column(Name = "group_id", IsNullable = false)]
public int GroupId { get; set; }
/// <summary>
/// 商品编号,对应 goods.goods_id
/// </summary>
[Column(Name = "goods_id", IsNullable = false)]
public long GoodsId { get; set; }
/// <summary>最近上报的安全结论,null 表示尚未检测。</summary>
[Column(Name = "is_safe", IsNullable = true)]
public bool? IsSafe { get; set; }
/// <summary>
/// 收藏时间
/// </summary>
[Column(Name = "created_at", IsNullable = false)]
public DateTime CreatedAt { get; set; }
}
}