using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WCS.DAL.DbModels
{
    [SugarTable("wcs_store_info")]
    public partial class StoreInfo
    {
        /// <summary>
        /// 库位Id
        /// </summary>
        [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsNullable = false, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 入库的库位编码
        /// </summary>
        [SugarColumn(ColumnName = "store_code", Length = 50, IsNullable = false, ColumnDescription = "库位编码")]
        public string StoreCode { get; set; }
        /// <summary>
        /// 货架类型Id
        /// </summary>
        [SugarColumn(ColumnName = "shelf_type_id", IsNullable = false, DefaultValue = "0", ColumnDescription = "货架类型Id")]
        public int ShelfTypeId { get; set; } 
        /// <summary>
        /// 模组Id
        /// </summary>
        [SugarColumn(ColumnName = "module_id", IsNullable = false, ColumnDescription = "模组Id")]
        public int ModuleId { get; set; } 

        /// <summary>
        /// 模组编号
        /// </summary>
        [SugarColumn(ColumnName = "module_code", Length = 50, IsNullable = false, ColumnDescription = "模组编码")]
        public string ModuleCode { get; set; }

        /// <summary>
        /// 货架Id
        /// </summary>
        [SugarColumn(ColumnName = "shelf_id", IsNullable = false, ColumnDescription = "货架Id")]
        public int ShelfId { get; set; }

        /// <summary>
        /// 货架号
        /// </summary>
        [SugarColumn(ColumnName = "shelf_code", Length = 50, IsNullable = false, ColumnDescription = "货架编码;货架一般按照报警灯来区分 一个报警灯指示的是一个货架")]
        public string ShelfCode { get; set; }

        /// <summary>
        /// 板子的Id
        /// </summary>
        [SugarColumn(ColumnName = "board_id", IsNullable = false, ColumnDescription = "模组pcb板id")]
        public int BoardId { get; set; }

        /// <summary>
        /// 板子上第几个灯
        /// </summary>
        [SugarColumn(ColumnName = "light_number", IsNullable = true, ColumnDescription = "板子上第几个灯")]
        public int LightNumber { get; set; }

        /// <summary>
        /// 优先级;为钢网柜推荐库位预留
        /// </summary>
        [SugarColumn(ColumnName = "priority", IsNullable = true, ColumnDescription = "板子上第几个灯")]
        public int Priority { get; set; }

        /// <summary>
        /// 当前物料;货架这种一对一且带检测的就给这个赋值，方便出入库时的查询
        /// </summary>
        [SugarColumn(ColumnName = "current_mat_sn", Length = 200, IsNullable = true, ColumnDescription = "当前物料")]
        public string CurrentMatSn { get; set; }

        /// <summary>
        /// 当前电压;当前电压，调试排查问题用
        /// </summary>
        [SugarColumn(ColumnName = "current_voltage", IsNullable = true, ColumnDescription = "当前电压值")]
        public decimal CurrentVoltage { get; set; }

        /// <summary>
        /// 标准电压;标准电压，调试排查问题用
        /// </summary>
        [SugarColumn(ColumnName = "standard_voltage", IsNullable = true, ColumnDescription = "标准电压值")]
        public decimal StandardVoltage { get; set; }

        /// <summary>
        /// 偏差电压;偏差电压，调试排查问题用
        /// </summary>
        [SugarColumn(ColumnName = "offset_voltage", IsNullable = true, ColumnDescription = "电压偏移值")]
        public decimal OffsetVoltage { get; set; }

        /// <summary>
        /// 串联绑定后的大货架编码
        /// </summary>
        [SugarColumn(ColumnName = "Bind_shelf_code", IsNullable = true, ColumnDescription = "串联绑定后的大货架编码")]
        public string? BigShelfCode { get; set; } = string.Empty;
        /// <summary>
        /// Row 行
        /// </summary>
        [SugarColumn(ColumnName = "R", Length = 10, IsNullable = true, ColumnDescription = "库位 行")]
        public string R { get; set; }
        /// <summary>
        /// Column 列
        /// </summary>
        [SugarColumn(ColumnName = "C", Length = 10, IsNullable = true, ColumnDescription = "库位 列")]
        public string C { get; set; }
        /// <summary>
        /// Column 位
        /// </summary>
        [SugarColumn(ColumnName = "Wei", Length = 10, IsNullable = true, ColumnDescription = "库位 位 第几个库位灯")]
        public string Wei { get; set; }

        /// <summary>
        /// 货架的组别、区域（区分单个软件管哪些货架的，前端的配置文件配置一个组别，查询时只显示当前组别的货架）
        /// </summary>
        [SugarColumn(ColumnName = "group_name", Length = 50, IsNullable = false, DefaultValue = "0", ColumnDescription = "货架的组别、区域（区分单个软件管哪些货架的，前端的配置文件配置一个组别，查询时只显示当前组别的货架）")]
        public string GroupName { get; set; }

        /// <summary>
        /// 序号
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public int RowNumber { get; set; }
        /// <summary>
        /// 是否已经选择
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public bool IsSelected { get; set; }
    }
}
