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

43 lines
1.5 KiB
Python

6 months ago
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, BigInteger, String, DECIMAL, DateTime, Boolean
Base = declarative_base()
class WmsIngredientsLog(Base):
__tablename__ = 'wms_ingredients_log'
id = Column(BigInteger, primary_key=True, autoincrement=True)
net_weight = Column(DECIMAL(24,2))
is_deleted = Column(Boolean, default=False)
create_time = Column(DateTime)
# 其他字段省略...
code_sn = Column(String(50))
ingredients_id = Column(BigInteger)
ingredients_name = Column(String(90))
manufacturer_id = Column(BigInteger)
manufacturer_name = Column(String(90))
part_number = Column(String(50))
lot_number = Column(String(50))
product_id = Column(BigInteger)
product_name = Column(String(90))
item_specification = Column(String(90))
item_id = Column(BigInteger)
net_weight = Column(DECIMAL(24,2))
gross_weight = Column(DECIMAL(24,2))
tare_weight = Column(DECIMAL(24,2), default=0.00)
measure_id = Column(BigInteger)
measure_name = Column(String(90))
job_number = Column(String(90))
status = Column(String(1))
is_deleted = Column(Boolean, default=False)
version = Column(BigInteger, default=0)
create_by = Column(String(100))
create_time = Column(DateTime)
update_by = Column(String(100))
update_time = Column(DateTime)
attr1 = Column(String(255))
attr2 = Column(BigInteger)
# attr3 JSON 可加 sqlalchemy.dialects.mysql.JSON
order_weight = Column(DECIMAL(24,2))
is_documents = Column(String(1))