using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;
namespace DM_Weight.Models
{
public class MachineRecord
{
///
/// 主键
///
public int Id { get; set; }
///
/// 设备id
///
public string MachineId { get; set; }
///
/// 药品id
///
public string DrugId { get; set; }
public DrugInfo DrugInfo { get; set; }
///
/// 数量
///
public int Quantity { get; set; }
public int? StockQuantity { get; set; }
public int? CheckQuantity { get; set; }
///
/// 批号
///
public string ManuNo { get; set; }
///
/// 操作人id
///
public int? Operator { get; set; }
public UserList User { get; set; }
///
/// 审核人id
///
public int? Reviewer { get; set; }
///
/// 操作时间
/// 默认值: CURRENT_TIMESTAMP
///
public DateTime OperationTime { get; set; }
///
/// 效期
///
public DateTime? EffDate { get; set; }
///
/// 出库入库类型(1入库2出库31还药32还空瓶4盘点5日结存)
///
public int Type { get; set; }
///
/// 出入库调拨单id
///
public string InvoiceId { get; set; }
///
/// 列号
///
public int ColNo { get; set; }
///
/// 抽屉号
///
public int DrawerNo { get; set; }
///
/// 取药科室
///
public string DepartmentId { get; set; }
///
/// 是否已经退药(0:没有1:还了部分2:完成)
/// 默认值: 0
///
public int Status { get; set; }
///
/// 退药量
/// 默认值: 0
///
//[SugarColumn(ColumnName = "return_quantity1", IsOnlyIgnoreInsert = true)]
public int ReturnQuantity1 { get; set; }
///
/// 退空瓶量
/// 默认值: 0
///
//[SugarColumn(ColumnName = "return_quantity2", IsOnlyIgnoreInsert = true
public int ReturnQuantity2 { get; set; }
///
/// 取药记录id
///
public int? GetId { get; set; }
///
/// 是否已经销毁
/// 默认值: 0
///
public int? IsDestroy { get; set; }
public int CanReturnQuantity
{
get => Quantity - ReturnQuantity1 - ReturnQuantity2;
}
public bool IsSelected { get; set; }
///
/// 药品对应批号库存
///
public int? ManunoQuantity { get; set; }
///
/// 供应单位
///
public string SupplierDept { get; set; }
///
/// 领用部门
///
public string ReceiveDept { get; set; }
}
}