HKC/DM_Weight/Models/OrderInfo.cs

258 lines
8.1 KiB
C#
Raw Normal View History

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