using System;
using SqlSugar;

namespace WCS.Entity
{
    /// <summary>
    ///  码垛缓存线位信息
    /// </summary>
    [SugarTable(nameof(WCS_CacheLineLoc), "码垛缓存线位信息")]
    public class WCS_CacheLineLoc
    {
        /// <summary>
        ///  ID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "ID")]
        public int Id { get; set; }

        /// <summary>
        ///  对应的设备号
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "对应的设备号")]
        public short LocationNo { get; set; }

        /// <summary>
        ///  坐标号
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "坐标号")]
        public string XYNo { get; set; }

        /// <summary>
        /// 物料号
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "物料号")]
        public string MatCode { get; set; }

        /// <summary>
        ///  任务号
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "任务号")]
        public int TaskId { get; set; }

        /// <summary>
        ///  任务信息
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(TaskId))]
        public WCS_TaskInfo Task { get; set; }

        /// <summary>
        ///  码垛缓存线主表ID
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "码垛缓存线主表ID")]
        public int CacheLineId { get; set; }

        /// <summary>
        ///  是否有货
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "是否有货")]
        public bool InStock { get; set; }

        /// <summary>
        ///  是否空置
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "是否有货")]
        public bool IsEmpty { get; set; }

        /// <summary>
        ///  创建时间
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "创建时间")]
        public DateTime AddTime { get; set; }

        /// <summary>
        ///  编辑时间
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "编辑时间")]
        public DateTime EditTime { get; set; }

        /// <summary>
        ///  正反面  1正面 2反面
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "正反面")]
        public int SideNum { get; set; }

        /// <summary>
        ///  超时时间-小时
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public int TimeOut { get; set; }
    }
}