提交
This commit is contained in:
1 parent
d336fd0226
commit
2e9d020d50
3454 files changed
+878963
-319
No files matched your search
@@ -0,0 +1,42 @@
|
||||
"""分类参数关联模型"""
|
||||
from datetime import datetime
|
||||
|
||||
from sqlalchemy import Column, String, DateTime, Integer
|
||||
|
||||
from app.core.database import Base
|
||||
|
||||
|
||||
class BasCategoryParameter(Base):
|
||||
"""商品分类-参数关联表"""
|
||||
__tablename__ = "bas_category_parameter"
|
||||
|
||||
id = Column(String(32), primary_key=True, comment="主键ID")
|
||||
category_id = Column(String(32), nullable=False, comment="分类ID")
|
||||
parameter_id = Column(String(32), nullable=False, comment="参数ID")
|
||||
is_required = Column(Integer, default=0, comment="该分类下是否必填:0-否, 1-是")
|
||||
default_value = Column(String(500), nullable=True, comment="默认值")
|
||||
sort_order = Column(Integer, default=0, comment="排序")
|
||||
is_del = Column(Integer, default=0, comment="是否删除:0-否, 1-是")
|
||||
create_at = Column(DateTime, default=datetime.now, comment="创建时间")
|
||||
create_by = Column(String(32), nullable=True, comment="创建人ID")
|
||||
create_name = Column(String(100), nullable=True, comment="创建人姓名")
|
||||
update_at = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment="修改时间")
|
||||
update_by = Column(String(32), nullable=True, comment="修改人ID")
|
||||
|
||||
|
||||
class BasCategoryParameterHis(Base):
|
||||
"""商品分类-参数关联表历史表"""
|
||||
__tablename__ = "bas_category_parameter_his"
|
||||
|
||||
id = Column(String(32), primary_key=True, nullable=False, comment="主键ID")
|
||||
category_id = Column(String(32), nullable=True, comment="分类ID")
|
||||
parameter_id = Column(String(32), nullable=True, comment="参数ID")
|
||||
is_required = Column(Integer, default=0, comment="是否必填")
|
||||
default_value = Column(String(500), nullable=True, comment="默认值")
|
||||
sort_order = Column(Integer, default=0, comment="排序")
|
||||
create_at = Column(DateTime, nullable=True, comment="创建时间")
|
||||
create_by = Column(String(32), nullable=True, comment="创建人ID")
|
||||
create_name = Column(String(100), nullable=True, comment="创建人姓名")
|
||||
update_at = Column(DateTime, nullable=True, comment="修改时间")
|
||||
update_by = Column(String(32), nullable=True, comment="修改人ID")
|
||||
his_create_at = Column(DateTime, default=datetime.now, comment="历史记录创建时间")
|
||||
Reference in new issue
Block a user