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

namespace Atomx.Common.Entities
{
    /// <summary>
    /// 出入库记录
    /// </summary>
    [Table("WarehouseStockRecords")]
    public class WarehouseStockRecord
    {
        /// <summary>
        /// 数据ID
        /// </summary>
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        [Key]
        public long Id { get; set; }

        /// <summary>
        /// 类型,0入库，1出库，初始
        /// </summary>
        public int? Type { get; set; }

        /// <summary>
        /// 产生动作的用户ID
        /// </summary>
        public long? Operator { get; set; }

        /// <summary>
        /// 备注说明
        /// </summary>
        [Column(TypeName = "varchar(255)")]
        public string Note { get; set; } = string.Empty;

        /// <summary>
        /// 注册数据创建时间
        /// </summary>
        [Column(TypeName = "timestamptz")]
        public DateTime CreateTime { get; set; } = DateTime.UtcNow;
    }
}
