using System; using System.Collections.Generic; using System.Linq; using Prism.Mvvm; using SqlSugar; namespace DM_Weight.Models { /// /// /// [SugarTable("order_info_sm")] public class OrderInfo:BindableBase { /// /// 是否选中 /// private bool _itemIsChecked; [SugarColumn(IsIgnore = true)] public bool ItemIsChecked { get=> _itemIsChecked; set=>SetProperty(ref _itemIsChecked,value); } /// /// /// private int _orderId; [SugarColumn(ColumnName = "order_id", IsPrimaryKey = true, IsIdentity = true)] public int OrderId { get=> _orderId; set=>SetProperty(ref _orderId,value); } /// /// /// 默认值: NULL /// private string _pharmacy; [SugarColumn(ColumnName = "pharmacy")] public string Pharmacy { get=>_pharmacy; set=>SetProperty(ref _pharmacy,value); } /// /// /// private string _orderNo; [SugarColumn(ColumnName = "order_no")] public string OrderNo { get=> _orderNo; set=>SetProperty(ref _orderNo,value); } /// /// /// private string _patientId; [SugarColumn(ColumnName = "patient_id")] public string PatientId { get=> _patientId; set=>SetProperty(ref _patientId,value); } /// /// /// private string _pName; [SugarColumn(ColumnName = "p_name")] public string PName { get=> _pName; set=>SetProperty(ref _pName,value); } /// /// /// 默认值: NULL /// private string _sex; [SugarColumn(ColumnName = "sex")] public string Sex { get=> _sex; set=>SetProperty(ref _sex,value); } /// /// /// 默认值: NULL /// private string _age; [SugarColumn(ColumnName = "age")] public string Age { get=> _age; set=>SetProperty(ref _age,value); } /// /// /// 默认值: NULL /// private string _idNumber; [SugarColumn(ColumnName = "id_number")] public string IdNumber { get=> _idNumber; set=> SetProperty(ref _idNumber, value); } /// /// /// 默认值: NULL /// private string _patientCard; [SugarColumn(ColumnName = "patient_card")] public string PatientCard { get=> _patientCard; set=>SetProperty(ref _patientCard,value); } /// /// /// 默认值: NULL /// private string _invoiceNo; [SugarColumn(ColumnName = "invoice_no")] public string InvoiceNo { get=> _invoiceNo; set=>SetProperty(ref _invoiceNo,value); } /// /// /// 默认值: NULL /// private string _patientNo; [SugarColumn(ColumnName = "patient_no")] public string PatientNo { get=> _patientNo; set=>SetProperty(ref _patientNo,value); } /// /// /// 默认值: NULL /// private string _doctorName; [SugarColumn(ColumnName = "doctor_name")] public string DoctorName { get=> _doctorName; set=>SetProperty(ref _doctorName,value); } /// /// /// 默认值: NULL /// private DateTime _orderDate; [SugarColumn(ColumnName = "order_date")] public DateTime OrderDate { get=> _orderDate; set=>SetProperty(ref _orderDate,value); } /// /// /// private DateTime _chargeDate; [SugarColumn(ColumnName = "charge_date")] public DateTime ChargeDate { get; set; } /// /// /// 默认值: NULL /// private DateTime _recvDate; [SugarColumn(ColumnName = "recv_date")] public DateTime RecvDate { get=> _recvDate; set=>SetProperty(ref _recvDate,value); } /// /// /// 默认值: NULL /// private string _deptName; [SugarColumn(ColumnName = "dept_name")] public string DeptName { get=> _deptName; set=>SetProperty(ref _deptName,value); } /// /// /// 默认值: NULL /// private string _disease; [SugarColumn(ColumnName = "disease")] public string Disease { get=> _disease; set=>SetProperty(ref _disease,value); } /// /// /// 默认值: NULL /// private string _orderType; [SugarColumn(ColumnName = "order_type")] public string OrderType { get=> _orderType; set=>SetProperty(ref _orderType,value); } /// /// /// 默认值: NULL /// private string _chargeType; [SugarColumn(ColumnName = "charge_type")] public string ChargeType { get=> _chargeType; set=>SetProperty(ref _chargeType,value); } /// /// /// private int _state; [SugarColumn(ColumnName = "state")] public int State { get=> _state; set=>SetProperty(ref _state,value); } /// /// /// 默认值: 0 /// private int? _hisDispFlag; [SugarColumn(ColumnName = "his_disp_flag")] public int? HisDispFlag { get=> _hisDispFlag; set=>SetProperty(ref _hisDispFlag,value); } /// /// /// 默认值: 0 ///] private int? _cancelFlag; [SugarColumn(ColumnName = "cancel_flag")] public int? CancelFlag { get=> _cancelFlag; set=>SetProperty(ref _cancelFlag,value); } /// /// 添加值1药师已确认,2管理已核对处方 /// 默认值: 0 /// private int? _dmStatus; [SugarColumn(ColumnName = "dm_status")] public int? DmStatus { get=> _dmStatus; set=>SetProperty(ref _dmStatus,value); } /// /// /// 默认值: NULL /// //[SugarColumn(ColumnName = "agent_name")] //public string AgentName { get; set; } /// /// /// 默认值: NULL /// //[SugarColumn(ColumnName = "agent_id_no")] //public string AgentIdNo { get; set; } /// /// /// 默认值: NULL /// [SugarColumn(ColumnName = "costs")] public decimal? Costs { get; set; } /// /// 药品请领状态(0未请领;1已请领) /// [SugarColumn(ColumnName = "apply_status")] public int ApplyStatus { get;set; } /// /// /// 默认值: NULL /// [SugarColumn(ColumnName = "machine_id")] public string MachineId { get; set; } /// /// /// 默认值: NULL /// //[SugarColumn(ColumnName = "payments")] //public decimal? Payments { get; set; } /// /// /// 默认值: NULL /// //[SugarColumn(ColumnName = "dispensary")] //public string Dispensary { get; set; } /// /// /// 默认值: NULL /// //[SugarColumn(ColumnName = "identity")] //public string Identity { get; set; } [Navigate(NavigateType.OneToMany, nameof(OrderDetail.OrderId))] public List OrderDetailList { get; set; } //一个处方对应一种药 [Navigate(NavigateType.OneToOne, nameof(OrderDetail.OrderId))] public OrderDetail _OrderDetail { get; set; } //处方下药品总数 [SugarColumn(IsIgnore =true)] public int TotalQuantity { get; set; } //麻醉师开的对应抽屉号 [SugarColumn(ColumnName = "doctor_code")] public int DrawerCode { get; set; } //麻醉师工号 [SugarColumn(ColumnName = "anaesthetist_code")] public string DoctorCode { get; set; } //麻醉师姓名 [SugarColumn(ColumnName = "anaesthetist_name")] public string AnaesthetistName { get; set; } } }