增加项目的各个功能

This commit is contained in:
qiaoxinjiu
2026-05-07 19:21:19 +08:00
parent aba1618f89
commit ee6cd4ae66
121 changed files with 9346 additions and 43 deletions

View File

@@ -0,0 +1,19 @@
from sqlalchemy import BigInteger, Column, Integer, SmallInteger, String, TIMESTAMP, Text, text
from sqlalchemy.ext.declarative import declarative_base
from common.sqlSession import to_dict
Base = declarative_base()
Base.to_dict = to_dict
class Product(Base):
__tablename__ = 'product'
id = Column(BigInteger, primary_key=True, autoincrement=True, comment='id')
name = Column(String(128), nullable=False, comment='产品名称')
code = Column(String(64), unique=True, nullable=False, comment='产品编码')
description = Column(Text, comment='产品描述')
status = Column(SmallInteger, default=1, comment='1:启用 0:禁用')
is_delete = Column(Integer, default=0, comment='0未删除1已删除')
created_time = Column(TIMESTAMP, server_default=text('CURRENT_TIMESTAMP'), nullable=True, comment='创建时间')
updated_time = Column(TIMESTAMP, server_default=text('CURRENT_TIMESTAMP'), server_onupdate=text('CURRENT_TIMESTAMP'), nullable=True, comment='修改时间')