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

namespace Atomx.Common.Entities
{
    /// <summary>
    /// 物料原料类型数据
    /// </summary>
    [Table("Materials")]
    public class Material
    {
        /// <summary>
        /// 数据ID
        /// </summary>
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        [Key]
        public long Id { get; set; }

        /// <summary>
        /// 原料类型
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// 原料归属公司ID
        /// </summary>
        public long CorporationId { get; set; }

        /// <summary>
        /// 原料归属店铺网点ID
        /// </summary>
        public long StoreId { get; set; }

        /// <summary>
        /// 原料数量
        /// </summary>
        public decimal Quantity { get; set; }

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