using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DM_Dal.Models
{
//[SugarTable("channel_list")]
public class ChannelList
{
///
///
///
//[SugarColumn(ColumnName = "chnguid", IsPrimaryKey = true)]
//[SugarColumn(ColumnName = "id", IsPrimaryKey = true)]
public string Id { get; set; }
///
///
/// 默认值: NULL
/////
//[SugarColumn(ColumnName = "machine_id")]
public string MachineId { get; set; }
///
///
/// 默认值: NULL
///
//[SugarColumn(ColumnName = "row_no")]
public int DrawerNo { get; set; }
///
///
/// 默认值: NULL
///
public int ColNo { get; set; }
///
///
/// 默认值: NULL
///
public int PosNo { get; set; }
///
///
/// 默认值: NULL
///
public string DrugId { get; set; }
/////
/////
///// 默认值: NULL
/////
//[SugarColumn(ColumnName = "manu_no")]
//public string ManuNo { get; set; }
/////
/////
///// 默认值: NULL
/////
//[SugarColumn(ColumnName = "eff_date")]
//public string EffDate { get; set; }
/////
/////
///// 默认值: NULL
/////
//[SugarColumn(ColumnName = "quantity")]
//public int Quantity { get; set; }
///
///
/// 默认值: 1
///
public int DrawerType { get; set; }
///
///
/// 默认值: 1
///
public int BoardType { get; set; }
///
///
/// 默认值: 1
///
public int? State { get; set; }
public bool IsSelected { get; set; }
public InOutInvoice Invoice { get; set; }
public string Location
{
get => DrawerNo + "-" + ColNo;
}
//private int _addQuantity = 0;
//[SugarColumn(IsIgnore = true)]
//public int AddQuantity
//{
// get => _addQuantity;
// set
// {
// SetProperty(ref _addQuantity, value);
// }
//}
//private int _takeQuantity = 0;
//[SugarColumn(IsIgnore = true)]
//public int TakeQuantity
//{
// get => _takeQuantity;
// set
// {
// if (value > Quantity)
// {
// throw new ArgumentException("取药数量不能大于库存");
// }
// SetProperty(ref _takeQuantity, value);
// }
//}
//private int _returnQuantity = 0;
//[SugarColumn(IsIgnore = true)]
//public int ReturnQuantity
//{
// get => _returnQuantity;
// set
// {
// SetProperty(ref _returnQuantity, value);
// }
//}
//private int _checkQuantity = 0;
//[SugarColumn(IsIgnore = true)]
//public int CheckQuantity
//{
// get => _checkQuantity;
// set
// {
// if (value < 0)
// {
// throw new ArgumentException("盘点数量不能是负数");
// }
// SetProperty(ref _checkQuantity, value);
// }
//}
//[SugarColumn(IsIgnore = true)]
//public int? CanReturnQuantity { get; set; }
//private DrugInfo? _DrugInfo;
//[Navigate(NavigateType.ManyToOne, nameof(DrugId))]
//public DrugInfo Drug { get => _DrugInfo; set => SetProperty(ref _DrugInfo, value); }
////[SugarColumn(IsIgnore = true)]
////public int process { get; set; } = 0;
//private DrugManuNo? _drugManuNo;
//[SugarColumn(IsIgnore = true)]
//public DrugManuNo? drugManuNo { get => _drugManuNo; set => SetProperty(ref _drugManuNo, value); }
//private List? _channelStocks;
//[Navigate(NavigateType.OneToMany, nameof(ChannelStock.Chnguid))]
//public List channelStocks { get => _channelStocks; set => SetProperty(ref _channelStocks, value); }
//public int _totalCount;
//[SugarColumn(IsIgnore = true)]
//public int totalCount { get => _totalCount;set=> SetProperty(ref _totalCount, value); }
}
}