using SqlSugar;
using System;
using System.Collections.Generic;

namespace WCS.Entity
{
    /// <summary>
    ///  码垛缓存线主表
    /// </summary>
    [SugarTable(nameof(WCS_CacheLine), "码垛缓存线")]
    public class WCS_CacheLine
    {
        /// <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 short TargetAddress { get; set; }

        /// <summary>
        ///  位信息
        /// </summary>
        [Navigate(NavigateType.OneToMany, nameof(WCS_CacheLineLoc.CacheLineId))]
        public List<WCS_CacheLineLoc> Locations { get; set; }

        /// <summary>
        ///  要去的行信息对应的ID
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "要去的行信息对应的ID")]
        public int PalletizingRowId { get; set; }

        /// <summary>
        ///  要去的行信息
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(PalletizingRowId))]
        public WCS_PalletizingRow WCS_PalletizingRow { get; set; }

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

        /// <summary>
        ///  有货数量
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "有货数量")]
        public int Quantity { get; set; }

        /// <summary>
        ///  当前线体对应的物料编码组
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "当前线体对应的物料编码组")]
        public string MatCodeList { get; set; }

        /// <summary>
        ///  当前线体是否放满货物
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "当前线体是否放满货物")]
        public bool InStock { get; set; }

        /// <summary>
        ///  桁架是否开始取货
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "桁架是否开始取货")]
        public bool IsTruss { get; set; }

        /// <summary>
        ///  仓库编号
        /// </summary>
        [SugarColumn(ColumnDescription = "仓库编号", IsNullable = true)]
        public string WarehouseCode { get; set; }

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

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