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

namespace WCS.Entity
{
    /// <summary>
    ///  码垛行信息表
    /// </summary>
    [SugarTable(nameof(WCS_PalletizingRow), "码垛行信息表")]
    public class WCS_PalletizingRow
    {
        /// <summary>
        ///  Id
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "Id")]
        public int Id { get; set; }

        /// <summary>
        ///  码垛层信息表Id
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "码垛层信息表Id")]
        public int PalletizingLayerId { get; set; }

        /// <summary>
        ///  码垛信息表Id
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "码垛信息表Id")]
        public int PalletizingId { get; set; }

        /// <summary>
        ///  码垛信息
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(PalletizingId))]
        public WCS_Palletizing Palletizing { get; set; }

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

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

        /// <summary>
        ///  行号
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "行号")]
        public int RowNo { get; set; }

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

        /// <summary>
        ///  表示每一个具体位置的商品信息
        /// </summary>
        [Navigate(NavigateType.OneToMany, nameof(WCS_PalletizingLoc.PalletizingRowId))]
        public List<WCS_PalletizingLoc> Locs { get; set; }

        /// <summary>
        ///  行缓存Id
        /// </summary>
        [SugarColumn(IsNullable = false, ColumnDescription = "任务Id")]
        public int CacheLineId { get; set; }

        /// <summary>
        ///  行缓存
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(CacheLineId))]
        public WCS_CacheLine CacheLine { get; set; }

        /// <summary>
        ///  当前所有的物料号
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "当前所有的物料号")]
        public string MatCodeList { get; set; }

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

        /// <summary>
        ///  取货线体号
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "取货线体号")]
        public string? LineCode { 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>
        ///  仓库编号
        /// </summary>
        [SugarColumn(ColumnDescription = "仓库编号", IsNullable = true)]
        public string WarehouseCode { get; set; }
    }
}
