using System;
using System.Collections.Generic;
using System.Linq;
using SqlSugar;
namespace DM_Weight.Models
{
    /// 
    /// 
    ///
    [SugarTable("drug_info")]
    public class DrugInfo
    {
        /// 
        ///  
        ///
        //[SugarColumn(ColumnName = "pharmacy")]
        //public string Pharmacy { get; set; }
        /// 
        /// ҩƷID 
        ///
        [SugarColumn(ColumnName = "drug_id", IsPrimaryKey = true)]
        public string DrugId { get; set; }
        /// 
        /// ƴ 
        ///
        [SugarColumn(ColumnName = "py_code")]
        public string PyCode { get; set; }
        /// 
        ///  
        ///
        //[SugarColumn(ColumnName = "BD_code")]
        //public string BdCode { get; set; }
        /// 
        /// ҩƷ 
        ///
        [SugarColumn(ColumnName = "drug_barcode")]
        public string DrugBarcode { get; set; }
        
        /// 
        /// ҩƷ���� 
        ///
        [SugarColumn(ColumnName = "drug_name")]
        public string DrugName { get; set; }
        /// 
        ///  
        ///
        [SugarColumn(ColumnName = "drug_brand_name")]
        public string DrugBrandname { get; set; }
        /// 
        /// ҩƷ��� 
        ///
        [SugarColumn(ColumnName = "drug_spec")]
        public string DrugSpec { get; set; }
        /// 
        /// ���� 
        ///
        [SugarColumn(ColumnName = "dosage")]
        public string Dosage { get; set; }
        /// 
        /// ��װ��λ 
        ///
        [SugarColumn(ColumnName = "pack_unit")]
        public string PackUnit { get; set; }
        /// 
        /// �������� 
        ///
        [SugarColumn(ColumnName = "manufactory")]
        public string Manufactory { get; set; }
        /// 
        /// ���ҩ�� 
        ///
        [SugarColumn(ColumnName = "max_stock")]
        public int? MaxStock { get; set; }
        //[SugarColumn(IsIgnore=true)]
        [Navigate(NavigateType.OneToMany, nameof(ChannelStock.DrugId), nameof(DrugId))]//BookA表中的studenId
        public List channelStocks { get; set; }
        [Navigate(NavigateType.OneToMany, nameof(DrugManuNo.DrugId))]//BookA表中的studenId
        public List? DrugManuNos { get; set; }
        [SugarColumn(IsIgnore = true)]
        public int? StockQuantity { get; set; }
        [SugarColumn(IsIgnore = true)]
        public string drug_name_spec { get; set; }
        //[SugarColumn(ColumnName = "drug_name_spec")]
        //public string Name { get; set; }
        [Navigate(NavigateType.OneToMany, nameof(DrugManuNo.DrugId))]//BookA表中的studenId
        public DrugManuNo? drugManuNo { get; set; }
    }
}