You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yy_rms_39zhiyao_duizhao/DataEntity/MedicamentModels.py

162 lines
7.3 KiB

#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@Date:2022/07/13 15:16:50
'''
from model_name_utlis import model_name_loer
from sqlalchemy import Column, String, Integer, Text, Float
from sqlalchemy.ext.declarative import declarative_base
class EntityMedicament(declarative_base()):
__tablename__ = "rms_medicament"
__table_args__ = (
{
"comment": "药剂信息实体类"
}
)
medicament_id = Column(String(50), primary_key=True, comment="药剂ID")
variety_id = Column(String(50), comment="药剂类型ID")
bar_code = Column(String(50), comment="条码")
client_id = Column(String(50), comment="终端ID")
client_code = Column(String(50), comment="终端编号")
customer_id = Column(String(50), comment="客户ID")
cas_number = Column(String(50), comment="药剂cas码")
name = Column(String(50), comment="药剂名称")
english_name = Column(String(50), comment="英文名称")
manufacturer = Column(String(50), comment="生产厂商")
distributor = Column(String(50), comment="销售商")
production_date = Column(String(50), comment="生产日期")
expiration_date = Column(String(50), comment="过期日期")
shelf_life = Column(Integer, comment="保质期")
inventory_warning_value = Column(Integer, comment="库存")
shelf_life_warning_value = Column(Integer, comment="保质期到期提前预警天数")
use_days_warning_value = Column(Integer, comment="使用超期预警天数")
is_weigh = Column(Integer, default=1, comment="是否称重")
weigh_flag = Column(Integer, default=0, comment="称重标志")
remain = Column(String(50), comment="库存余量")
# Speci = Column(Float) # 规格
# SpeciUnit = Column(String(50)) # 规格单位
# Unit = Column(String(50)) # 单位
total = Column(String(50), comment="总量")
net_weight_unit = Column(String(50), comment="净含量单位")
net_weight = Column(String(50), comment="净含量")
tp = Column(String(50), comment="类型")
purity = Column(String(50), comment="药剂纯度")
price = Column(String(50), comment="价格")
flow_position_code = Column(String(50), comment="试剂所在柜层位置信息")
cell_position_code = Column(String(50), comment="试剂所在抽屉位置信息")
place = Column(String(50), comment="位置")
status = Column(Integer, comment="当前状态1在库2出库3空瓶")
is_supervise = Column(Integer, comment="是否监管")
by_user_date = Column(String(50), comment="最后使用日期")
by_user_id = Column(String(50), comment="最后使用人ID")
by_user_name = Column(String(50), comment="最后使用人名称")
put_in_date = Column(String(50), comment="入库日期")
put_in_user_id = Column(String(50), comment="入库用户ID")
put_in_user_name = Column(String(50), comment="入库用户名")
is_add = Column(Integer, comment="")
user_auditing = Column(String(50), comment="用户审计")
# Remark1 = Column(String(50)) # 备注1
# Remark2 = Column(String(50)) # 备注2
# Remark3 = Column(String(50)) # 备注3
# Remark4 = Column(String(50))
# Remark5 = Column(String(50))
# Remark6 = Column(String(50))
# Remark7 = Column(String(50))
# Remark8 = Column(String(50))
# Remark9 = Column(String(50))
# Remark10 = Column(String(50))
class EntityMedicamentTemplate(declarative_base()):
__tablename__ = "rms_medicament_template"
__table_args__ = (
{
"comment": " 药剂入库模板实体类"
}
)
template_id = Column(String(50), primary_key=True, comment="模板ID")
customer_id = Column(String(50), comment="客户ID")
client_id = Column(String(50), comment="终端ID")
client_name = Column(String(50), comment="终端名称")
template_name = Column(String(50), comment="模板名称")
template_content = Column(Text, comment="模板内容")
is_wait_export = Column(Integer, comment="是否等待导入")
template_base64 = Column(Text, comment="模板Base64值")
start_bar_code = Column(String(50), comment="开始条形码")
bar_code_count = Column(Integer, comment="条形码数量")
create_date = Column(String(50), comment="创建日期")
create_user_id = Column(String(50), comment="创建用户ID")
create_user_name = Column(String(50), comment="创建用户名")
is_add = Column(Integer, comment="")
class EntityMedicamentRecord(declarative_base()):
__tablename__ = "rms_medicament_record"
__table_args__ = (
{
"comment": "药剂流转记录实体类"
}
)
record_id = Column(String(50), primary_key=True, comment="流转记录ID")
client_id = Column(String(50), comment="终端ID")
client_code = Column(String(50), comment="终端编号")
customer_id = Column(String(50), comment="客户ID")
variety_id = Column(String(50), comment="药剂类型ID")
medicament_id = Column(String(50), comment="药剂ID")
record_type = Column(Integer, comment="记录类型1入库2领用3归还")
price = Column(Float, comment="药剂价格")
is_empty = Column(Integer, comment="是否空瓶")
record_remain = Column(Float, default="0.00", comment="药剂使用余量")
use_quantity = Column(Float, default="0.00", comment="药剂单次使用量")
create_date = Column(String(50), comment="创建日期")
create_user_id = Column(String(50), comment="创建人ID")
create_user_name = Column(String(50), comment="创建人名称")
is_add = Column(Integer, comment="")
class EntityMedicamentVariety(declarative_base()):
__tablename__ = "rms_medicament_variety"
__table_args__ = (
{
"comment": "药剂类型实体类"
}
)
variety_id = Column(String(50), primary_key=True, comment="类型ID")
customer_id = Column(String(50), comment="客户ID")
cas_number = Column(String(50), comment="药剂cas码")
name = Column(String(50), comment="药剂名称")
english_name = Column(String(50), comment="英文名称")
purity = Column(String(50), comment="纯度")
# Speci = Column(Float) # 规格
# SpeciUnit = Column(String(50)) # 规格单位
# Unit = Column(String(50)) # 单位
total = Column(String(50), comment="总量")
net_weight_unit = Column(String(50), comment="净含量单位")
net_weight = Column(String(50), comment="净含量")
tp = Column(String(50), comment="类型")
is_supervise = Column(Integer, comment="是否监管")
inventory_warning_value = Column(Integer, comment="库存预警量")
shelf_life_warning_value = Column(Integer, comment="保质期到期提前预警天数")
use_days_warning_value = Column(Integer, comment="领用超期预警天数")
is_weigh = Column(Integer, comment="是否称重")
empty_count = Column(Integer, comment="空瓶数量")
use_count = Column(Integer, comment="当前领用数量")
normal_count = Column(Integer, comment="在库数量")
total_count = Column(Integer, comment="总数量")
# Remark1 = Column(String(50)) # 备注1
# Remark2 = Column(String(50)) # 备注2
# Remark3 = Column(String(50)) # 备注3
create_date = Column(String(50), comment="创建日期")
create_user_id = Column(String(50), comment="创建用户ID")
create_user_name = Column(String(50), comment="创建用户名称")
is_add = Column(Integer, comment="")