using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Atomx.Common.Entities
{
    /// <summary>
    /// 产品属性选项
    /// </summary>
    [Table("ProductAttributeOptions")]
    public class ProductAttributeOption
    {
        /// <summary>
        /// 预设值ID
        /// </summary>
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        [Key]

        public long Id { get; set; }

        /// <summary>
        /// 产品属性ID
        /// </summary>
        public long AttributeId { get; set; }

        /// <summary>
        /// 预设值名称
        /// </summary>
        [Column(TypeName = "varchar(50)")]
        public string Value { get; set; } = string.Empty;

        /// <summary>
        /// 属性值使用量
        /// </summary>
        public int Count { get; set; }

        /// <summary>
        /// 展示排序
        /// </summary>
        public int DisplayOrder { get; set; }

        /// <summary>
        /// 是否通用的
        /// </summary>
        public bool Standard { get; set; }

        /// <summary>
        /// 数据状态
        /// </summary>
        public int Status { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Column(TypeName = "timestamptz")]

        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [Column(TypeName = "timestamptz")]
        public DateTime? UpdateTime { get; set; }
    }
}
