调整数据库为wzxphoto
This commit is contained in:
@@ -3,6 +3,7 @@ import subprocess
|
|||||||
|
|
||||||
from config.mysql import DB_URL
|
from config.mysql import DB_URL
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
table = input("请输入表名:")
|
table = input("请输入表名:")
|
||||||
out_file = f"photo_review/entity/{table}.py"
|
out_file = f"photo_review/entity/{table}.py"
|
||||||
command = f"sqlacodegen {DB_URL} --outfile={out_file} --tables={table}"
|
command = f"sqlacodegen {DB_URL} --outfile={out_file} --tables={table}"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ HOSTNAME = '192.168.5.226'
|
|||||||
# 端口号
|
# 端口号
|
||||||
PORT = '3308'
|
PORT = '3308'
|
||||||
# 库名
|
# 库名
|
||||||
DATABASE = 'wzxtest'
|
DATABASE = 'wzxphoto'
|
||||||
# 用户名
|
# 用户名
|
||||||
USERNAME = 'root'
|
USERNAME = 'root'
|
||||||
# 密码
|
# 密码
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class ZxIeCost(Base):
|
|||||||
discharge_date = Column(Date, comment='出院日期')
|
discharge_date = Column(Date, comment='出院日期')
|
||||||
medical_expenses_str = Column(String(255), comment='费用总额字符串')
|
medical_expenses_str = Column(String(255), comment='费用总额字符串')
|
||||||
medical_expenses = Column(DECIMAL(18, 2), comment='费用总额')
|
medical_expenses = Column(DECIMAL(18, 2), comment='费用总额')
|
||||||
createtime = Column(DateTime, comment='创建时间')
|
create_time = Column(DateTime, comment='创建时间')
|
||||||
creator = Column(String(255), comment='创建人')
|
creator = Column(String(255), comment='创建人')
|
||||||
modifiedtime = Column(DateTime, comment='修改时间')
|
update_time = Column(DateTime, comment='修改时间')
|
||||||
modifier = Column(String(255), comment='修改人')
|
updater = Column(String(255), comment='修改人')
|
||||||
|
|||||||
23
photo_review/entity/zx_ie_cost_detail.py
Normal file
23
photo_review/entity/zx_ie_cost_detail.py
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
from sqlalchemy import Column, DECIMAL, DateTime, String
|
||||||
|
from sqlalchemy.dialects.mysql import INTEGER
|
||||||
|
|
||||||
|
from config.mysql import Base
|
||||||
|
|
||||||
|
|
||||||
|
class ZxIeCostDetail(Base):
|
||||||
|
__tablename__ = 'zx_ie_cost_detail'
|
||||||
|
|
||||||
|
pk_ie_cost_detail = Column(INTEGER(11), primary_key=True, comment='费用明细详情主键')
|
||||||
|
pk_ie_cost = Column(INTEGER(11), nullable=False, comment='费用明细信息抽取主键')
|
||||||
|
pk_phhd = Column(INTEGER(11), nullable=False, comment='报销案子主键')
|
||||||
|
_class = Column('class', String(255), comment='类别')
|
||||||
|
name = Column(String(255), comment='名称')
|
||||||
|
specification = Column(String(255), comment='规格')
|
||||||
|
price = Column(DECIMAL(18, 2), comment='单价')
|
||||||
|
quantity = Column(INTEGER(11), comment='数量')
|
||||||
|
amount = Column(DECIMAL(18, 2), comment='金额(单价 * 数量)')
|
||||||
|
create_time = Column(DateTime, comment='创建时间')
|
||||||
|
creator = Column(String(30), comment='创建人')
|
||||||
|
update_time = Column(DateTime, comment='修改时间')
|
||||||
|
updater = Column(String(30), comment='修改人')
|
||||||
@@ -10,6 +10,7 @@ class ZxIeDischarge(Base):
|
|||||||
|
|
||||||
pk_ie_discharge = Column(INTEGER(11), primary_key=True, comment='出院记录信息抽取主键')
|
pk_ie_discharge = Column(INTEGER(11), primary_key=True, comment='出院记录信息抽取主键')
|
||||||
pk_phhd = Column(INTEGER(11), nullable=False, unique=True, comment='报销案子主键')
|
pk_phhd = Column(INTEGER(11), nullable=False, unique=True, comment='报销案子主键')
|
||||||
|
content = Column(String(5000), comment='详细内容')
|
||||||
hospital = Column(String(255), comment='医院')
|
hospital = Column(String(255), comment='医院')
|
||||||
pk_yljg = Column(INTEGER(11), comment='医院主键')
|
pk_yljg = Column(INTEGER(11), comment='医院主键')
|
||||||
department = Column(String(255), comment='科别')
|
department = Column(String(255), comment='科别')
|
||||||
@@ -20,7 +21,7 @@ class ZxIeDischarge(Base):
|
|||||||
discharge_date_str = Column(String(255), comment='出院日期字符串')
|
discharge_date_str = Column(String(255), comment='出院日期字符串')
|
||||||
discharge_date = Column(Date, comment='出院日期')
|
discharge_date = Column(Date, comment='出院日期')
|
||||||
doctor = Column(String(30), comment='主治医师')
|
doctor = Column(String(30), comment='主治医师')
|
||||||
createtime = Column(DateTime, comment='创建时间')
|
create_time = Column(DateTime, comment='创建时间')
|
||||||
creator = Column(String(255), comment='创建人')
|
creator = Column(String(255), comment='创建人')
|
||||||
modifiedtime = Column(DateTime, comment='修改时间')
|
update_time = Column(DateTime, comment='修改时间')
|
||||||
modifier = Column(String(255), comment='修改人')
|
updater = Column(String(255), comment='修改人')
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class ZxIeSettlement(Base):
|
|||||||
personal_funded_amount_str = Column(String(255), comment='自费金额字符串')
|
personal_funded_amount_str = Column(String(255), comment='自费金额字符串')
|
||||||
personal_funded_amount = Column(DECIMAL(18, 2), comment='自费金额')
|
personal_funded_amount = Column(DECIMAL(18, 2), comment='自费金额')
|
||||||
medical_insurance_type = Column(String(255), comment='医保类型')
|
medical_insurance_type = Column(String(255), comment='医保类型')
|
||||||
createtime = Column(DateTime, comment='创建时间')
|
create_time = Column(DateTime, comment='创建时间')
|
||||||
creator = Column(String(255), comment='创建人')
|
creator = Column(String(255), comment='创建人')
|
||||||
modifiedtime = Column(DateTime, comment='修改时间')
|
update_time = Column(DateTime, comment='修改时间')
|
||||||
modifier = Column(String(255), comment='修改人')
|
updater = Column(String(255), comment='修改人')
|
||||||
|
|||||||
Reference in New Issue
Block a user