using System;
using System.Collections.Generic;
using System.Linq;
using Prism.Mvvm;
using SqlSugar;
namespace DM_Weight.Models
{
///
///
///
[SugarTable("drug_info")]
public class DrugInfo:BindableBase
{
///
///
///
//[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(ColumnName ="drug_type")]
public string DrugType { 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; }
private DrugBase _base;
[Navigate(NavigateType.OneToOne, nameof(DrugBase.DrugId), nameof(DrugId))]
public DrugBase drugBase
{
get=> _base;
set { SetProperty(ref _base, value); }
}
[SugarColumn(IsIgnore = true)]
public string drug_name_spec { get; set; }
}
}