Files
Atomx/Atomx.Common/Entities/ProductAttributeValue.cs
2025-12-14 18:27:21 +08:00

68 lines
1.7 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 System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Atomx.Common.Entities
{
/// <summary>
/// 产品属性值表
/// </summary>
[Table("ProductAttributeValues")]
public class ProductAttributeValue
{
/// <summary>
/// 数据ID
/// </summary>
[DatabaseGenerated(DatabaseGeneratedOption.None)]
[Key]
public long Id { get; set; }
/// <summary>
/// 产品ID
/// </summary>
public long ProductId { get; set; }
/// <summary>
/// 预设值ID
/// </summary>
public long OptionId { get; set; }
/// <summary>
/// 产品属性关系数据ID
/// </summary>
public long ProductAttributeRelationId { get; set; }
/// <summary>
/// 属性值名称
/// </summary>
[Column(TypeName = "varchar(50)")]
public string Name { get; set; } = string.Empty;
/// <summary>
/// 属性图片
/// </summary>
[Column(TypeName = "varchar(256)")]
public string Image { get; set; } = string.Empty;
/// <summary>
/// 重量
/// </summary>
[Column(TypeName = "decimal(18,4)")]
public decimal Weight { get; set; }
/// <summary>
/// 重量单位1克2千克3磅4盎司
/// </summary>
public int WeightUnit { get; set; }
/// <summary>
/// 是否是加重的
/// </summary>
public bool IsAddWeight { get; set; } = false;
/// <summary>
/// 展示排序
/// </summary>
public int DisplayOrder { get; set; }
}
}