using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive;
using System.Text;
using System.Threading.Tasks;
namespace DM_Weight.Models
{
    [SugarTable("in_out_invoice")]
    public class InOutInvoice
    {
        /// 
        /// 主键(序号)       
        /// 
        [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity =true)]
        public int Id { get; set; }
        [SugarColumn(ColumnName = "in_pharmacy_id")]
        public string InPharmacyId { get; set; }
        [SugarColumn(ColumnName = "out_pharmacy_id")]
        public string OutPharmacyId { get; set; }
        /// 
        /// 库存管理单位(入库单位代码) 
        /// 
        [SugarColumn(ColumnName = "storage")]
        public string storage { get; set; }
         /// 
         /// 单据号
         /// 
        [SugarColumn(ColumnName = "invoice_no")]
        public string InvoiceNo { get; set; }
        [SugarColumn(ColumnName = "invoice_date")]
        public string InvoiceDate { get; set; }
        /// 
        /// 药品id
        /// 
        [SugarColumn(ColumnName = "drug_id")]
        public string DrugId { get; set; }
        [Navigate(NavigateType.ManyToOne, nameof(DrugId))]
        public DrugInfo DrugInfo { get; set; }
        /// 
        /// 药品规格
        /// 
        [SugarColumn(ColumnName = "drug_spec")]
        public string DrugSpec { get; set; }
        /// 
        /// 计算单位
        /// 
        [SugarColumn(ColumnName = "units")]
        public string Units { get; set; }
        /// 
        /// 厂商标识
        /// 
        [SugarColumn(ColumnName = "firm_id")]
        public string FirmId { get; set; }
        /// 
        /// 包装规格(反映药品含量及包装信息,如0.25g*30)   
        /// 
        [SugarColumn(ColumnName = "package_spec")]
        public string PackageSpec { get; set; }
        
        /// 
        /// 数量(以包装单位所计的数量)      
        /// 
        [SugarColumn(ColumnName = "quantity")]
        public int quantity { get; set; }
        
        /// 
        /// 计量单位,可使用任一级管理上方便的包装
        /// 
        [SugarColumn(ColumnName = "package_units")]
        public string PackageUnits { get; set; }
        
        /// 
        /// 药品批次
        /// 
        [SugarColumn(ColumnName = "drug_manu_no")]
        public string DrugManuNo { get; set; }
       
        /// 
        /// 创建时间(入库日期)
        /// 
        [SugarColumn(ColumnName = "create_time")]
        public DateTime CreateTime { get; set; }
        
        /// 
        /// 1.请领入库 0.其它
        /// 
        [SugarColumn(ColumnName = "type")]
        public int Type { get; set; }
        
        /// 
        /// 类型描述
        /// 
        [SugarColumn(ColumnName = "type_describe")]
        public string TypeDescribe { get; set; }
        
        /// 
        /// 供货方
        /// 
        [SugarColumn(ColumnName = "supplier")]
        public string Supplier { get; set; }
        
        /// 
        /// 操作人
        /// 
        [SugarColumn(ColumnName = "operator")]
        public string Operator { get; set; }
        
        /// 
        /// 存放库房
        /// 
        [SugarColumn(ColumnName = "sub_storage")]
        public string SubStorage { get; set; }
        
        /// 
        /// 备注
        /// 
        [SugarColumn(ColumnName = "memos")]
        public string Memos { get; set; }
        [SugarColumn(ColumnName = "status")]
        public int Status { get; set; }
        [SugarColumn(ColumnName = "drug_eff_date")]
        public string DrugEffDate { get; set; }
        [SugarColumn(ColumnName = "his_id")]
        public string HisId { get; set; }
        [SugarColumn(ColumnName = "cancel_flag")]
        public int CancelFlag { get; set; }
    }
}