class OrderEvaluationVideo(Base): """订单评价视频""" __tablename__ = 'OrderEvaluationVideo' OEVid = Column(String(64), primary_key=True) OEid = Column(String(64), nullable=False, comment='评价id') OEVideo = Column(String(255), nullable=False, url=True, comment='视频url') OEVthumbnail = Column(String(255), nullable=False, url=True, comment='视频缩略图')
class NewsChangelog(Base): """资讯修改记录""" __tablename__ = 'NewsChangelog' NCLid = Column(String(64), primary_key=True) NEid = Column(String(64), nullable=False, comment='资讯id') ADid = Column(String(64), nullable=False, comment='管理员id') NCLoperation = Column(String(255), comment='进行操作')
class DisputeType(Base): """售后纠纷的一些内置理由""" __tablename__ = 'DisputeType' DIid = Column(String(64), primary_key=True) DIname = Column(String(32), nullable=False, comment='纠纷类型文字') DIsort = Column(Integer, nullable=False, comment='顺序标志') DItype = Column(Integer, default=0, comment='适用的售后类型0: 退货退款 10 仅退款')
class UserSearchHistory(Base): """用户搜索记录""" __tablename__ = 'UserSearchHistory' USHid = Column(String(64), primary_key=True) USid = Column(String(64), nullable=False, comment='用户id') USHname = Column(String(64), nullable=False, comment='搜索词') USHtype = Column(Integer, default=0, comment='搜索类型0 商品, 10 圈子')
class OrderEvaluationImage(Base): """订单评价图片""" __tablename__ = 'OrderEvaluationImage' OEIid = Column(String(64), primary_key=True) OEid = Column(String(64), nullable=False, comment='评价id') OEImg = Column(String(255), nullable=False, url=True, comment='图片url') OEIsort = Column(Integer, comment='图片顺序')
class ProductItems(Base): """ 商品标签关联表 """ __tablename__ = 'ProductItems' PIid = Column(String(64), primary_key=True) PRid = Column(String(64), nullable=False, comment='商品id') ITid = Column(String(64), nullable=False, comment='标签id')
class CouponFor(Base): """优惠券的使用对象""" __tablename__ = 'CouponFor' CFid = Column(String(64), primary_key=True) PCid = Column(String(64), comment='限制使用商品分类') PRid = Column(String(64), comment='限制使用商品') PBid = Column(String(64), comment='限制使用品牌') # pbid prid pcid 不可以同时存在 COid = Column(String(64), comment='优惠券id')
class CouponUser(Base): """用户的优惠券""" __tablename__ = 'CouponUser' UCid = Column(String(64), primary_key=True) COid = Column(String(64), nullable=False, comment='优惠券id') USid = Column(String(64), nullable=False, comment='用户id') UCalreadyUse = Column(Boolean, default=False, comment='是否已经使用') UCstatus = Column(Integer, default=0, comment='状态: 10 禁用')
class ProductSkuValue(Base): """ 商品sku属性顺序汇总 """ __tablename__ = 'ProductSkuValue' PSKUid = Column(String(64), primary_key=True) PRid = Column(String(64), nullable=False, comment='商品id') PSKUvalue = Column(Text, comment='属性名[[联通, 电信], [白, 黑], [16G, 32G]]')
class SceneItem(Base): """ 场景-标签 """ __tablename__ = 'SceneItem' SIid = Column(String(64), primary_key=True) PSid = Column(String(64), nullable=False, comment='场景id') ITid = Column(String(64), nullable=False, comment='标签id')
class UserIntegral(Base): """用户积分表""" __tablename__ = 'UserIntegral' UIid = Column(String(64), primary_key=True) USid = Column(String(64), comment='用户id') UIintegral = Column(Integer, comment='该动作产生的积分变化数') UIaction = Column(Integer, default=1, comment='积分变动原因 1 签到 2 积分商城消费') UItype = Column(Integer, default=1, comment='积分变动类型 1 收入 2 支出')
class NewsImage(Base): """资讯图片""" __tablename__ = 'NewsImage' NIid = Column(String(64), primary_key=True) NEid = Column(String(64), nullable=False, comment='资讯id') NIimage = Column(String(255), nullable=False, url=True, comment='图片url') NIsort = Column(Integer, comment='图片顺序') NIthumbnail = Column(String(255), url=True, comment='压缩图')
class ProductImage(Base): """ 商品图片 """ __tablename__ = 'ProductImage' PIid = Column(String(64), primary_key=True) PRid = Column(String(64), nullable=False, comment='商品id') PIpic = Column(String(255), nullable=False, comment='商品图片', url=True) PIsort = Column(Integer, comment='顺序')
class UserMedia(Base): """ 用户身份证图片表 """ __tablename__ = 'UserMetia' UMid = Column(String(64), primary_key=True) USid = Column(String(64), comment='用户id') UMurl = Column(Text, url=True, comment='图片路径') UMtype = Column(Integer, default=1, comment='图片类型 1: 身份证正面, 2: 身份证反面')
class AdminNotes(Base): """ 管理员变更记录 """ __tablename__ = 'AdminNotes' ANid = Column(String(64), primary_key=True) ADid = Column(String(64), nullable=False, comment='管理员id') ANaction = Column(Text, comment='变更动作') ANdoneid = Column(String(64), comment='修改人id')
class ProductScene(Base): """ 场景 """ __tablename__ = 'ProductScene' PSid = Column(String(64), primary_key=True) PSpic = Column(String(255), nullable=False, comment='图片', url=True) PSname = Column(String(16), nullable=False, comment='名字') PSsort = Column(Integer, comment='顺序标志')
class ManagerSystemNotes(Base): """后台通知""" __tablename__ = 'ManagerSystemNotes' MNid = Column(String(64), primary_key=True) MNcontent = Column(Text, comment='通知内容') # MNtarget = Column(Integer, default=1, comment='展示对象 1 超管 2 普管 3 供应商') MNstatus = Column(Integer, default=0, comment='通告状态 0 草稿 1 发布') MNcreateid = Column(String(64), comment='创建人') MNupdateid = Column(String(64), comment='修改人')
class GroupbuyingItem(Base): """ 子拼团主体 """ __tablename__ = 'GroupbuyingItem' GIid = Column(String(64), primary_key=True) GBid = Column(String(64), comment='主拼团id') GIstatus = Column(Integer, default=1, comment='子拼团状态 1 拼团中 2 拼团成功 3 撤销 4 超时结束')
class OrderCoupon(Base): """ 订单-优惠券使用表 """ __tablename__ = 'OrderRaward' OCid = Column(String(64), primary_key=True) COid = Column(String(64), nullable=False, comment='优惠券id') OMid = Column(String(64), nullable=False, comment='主单id') OCreduce = Column(Float, nullable=False, comment='减额') SUid = Column(String(64), comment='来源供应商, 如为none则为平台')
class SupplizerSettlement(Base): """供应商结算记录""" __tablename__ = 'SupplizerSettlement' SSid = Column(String(64), primary_key=True) SUid = Column(String(64), comment='供应商id') SSstatus = Column(Integer, default=0, comment='结算状态 0 结算中 1 已结算 -1 结算异常处理中 ') SSdealTime = Column(DateTime, comment='确认核算时间') SSdealamount = Column(DECIMAL(precision=28, scale=2), comment='确认核算金额')
class LogisticsCompnay(Base): """快递公司""" __tablename__ = 'LogisticsCompnay' id = Column(Integer, autoincrement=True, primary_key=True) LCname = Column(String(64), nullable=False, comment='公司名称') LCcode = Column(String(64), nullable=False, index=True, comment='快递公司编码') LCfirstCharater = Column(String(1), nullable=False, index=True, comment='首字母') LCisCommon = Column(Boolean, default=False, comment='是否常用') @orm.reconstructor def __init__(self): self.fields = ['LCname', 'LCcode', ]
class OrderEvaluation(Base): """订单评价""" __tablename__ = 'OrderEvaluation' OEid = Column(String(64), primary_key=True) USid = Column(String(64), nullable=False, comment='用户') USname = Column(String(255), comment='用户名') USheader = Column(Text, default='用户头像', url=True) OPid = Column(String(64), nullable=False, comment='订单副单id') OMid = Column(String(64), nullable=False, comment='订单主单id') PRid = Column(String(64), nullable=False, comment='商品id') SKUattriteDetail = Column(Text, nullable=False, comment='sku详情[]') OEtext = Column(String(255), nullable=False, default='此用户没有填写评价。', comment='评价内容') OEscore = Column(Integer, nullable=False, default=5, comment='五星评分')
class SupplizerAccount(Base): """供应商账户信息表""" __tablename__ = 'SupplizerAccount' SAid = Column(String(64), primary_key=True) SUid = Column(String(64), comment='供应商id') SAbankName = Column(Text, comment='开户行') SAbankDetail = Column(Text, comment='开户网点详情') SAcardNo = Column(String(32), comment='卡号') SAcardName = Column(Text, comment='开户人') SACompanyName = Column(Text, comment='公司名') SAICIDcode = Column(Text, comment='纳税识别码') SAaddress = Column(Text, comment='地址电话') SAbankAccount = Column(Text, comment='开票信息的银行账户')
class NewsVideo(Base): """资讯视频""" __tablename__ = 'NewsVideo' NVid = Column(String(64), primary_key=True) NEid = Column(String(64), nullable=False, comment='资讯id') NVvideo = Column(String(255), nullable=False, url=True, comment='视频url') NVthumbnail = Column(String(255), nullable=False, url=True, comment='视频缩略图') NVduration = Column(String(8), nullable=False, default='00:00', comment='视频时长')
class ActivationCodeRule(Base): """激活码提交页的一些规则等""" __tablename__ = 'ActivationCodeRule' ACRid = Column(String(64), primary_key=True) ACRrule = Column(Text, comment='规则') ACRphone = Column(String(11), comment='电话') ACRaddress = Column(String(64), comment='地址') ACRname = Column(String(16), nullable=False, comment='收款人') ACRbankSn = Column(String(32), nullable=False, comment='卡号') ACRbankAddress = Column(String(125), nullable=False, comment='支行地址') ACRAgreeMent = Column(Text, comment='协议') ACRisShow = Column(Boolean, default=True, comment='是否显示')
class Admin(Base): """ 管理员 """ __tablename__ = 'Admin' ADid = Column(String(64), primary_key=True) ADnum = Column(Integer, autoincrement=True) ADname = Column(String(255), comment='管理员名') ADtelphone = Column(String(13), comment='管理员联系电话') ADpassword = Column(Text, nullable=False, comment='密码') ADfirstpwd = Column(Text, comment=' 初始密码 明文保存') ADfirstname = Column(Text, comment=' 初始用户名') ADheader = Column(Text, comment='头像', url=True) ADlevel = Column(Integer, default=2, comment='管理员等级,{1: 超级管理员, 2: 普通管理员 }') ADstatus = Column(Integer, default=0, comment='账号状态,{0:正常, 1: 被冻结, 2: 已删除}')
class UserAddress(Base): """ 用户地址表 """ __tablename__ = 'UserAddress' UAid = Column(String(64), primary_key=True) USid = Column(String(64), comment='用户id/供应商id') UAname = Column(String(16), nullable=False, comment='收货人姓名') UAphone = Column(String(16), nullable=False, comment='收货人电话') UAtext = Column(String(255), nullable=False, comment='具体地址') UApostalcode = Column(String(8), comment='邮政编码') UAdefault = Column(Boolean, default=False, comment='默认收获地址') AAid = Column(String(8), nullable=False, comment='关联的区域id') UAFrom = Column(Integer, default=0, comment='地址所属 0:用户 10:供应商')
class NewsComment(Base): """资讯评论""" __tablename__ = 'NewsComment' NCid = Column(String(64), primary_key=True) NEid = Column(String(64), nullable=False, comment='资讯id') USid = Column(String(64), nullable=False, comment='评论者id') USname = Column(String(255), comment='用户名') USheader = Column(Text, default='用户头像', url=True) NCtext = Column(String(140), comment='评论内容') NCparentid = Column(String(64), comment='回复的父类评论id') NCrootid = Column(String(64), comment='回复源评论id')
class OrderLogistics(Base): """订单物流""" __tablename__ = 'OrderLogistics' OLid = Column(String(64), primary_key=True) OMid = Column(String(64), nullable=False, comment='主单id') # OPid = Column(String(125), comment='副单物流') OLcompany = Column(String(32), nullable=False, comment='物流公司') OLexpressNo = Column(String(64), nullable=False, comment='物流单号') OLsearchStatus = Column(String(8), default=0, comment='物流查询状态(待用字段) polling:监控中,shutdown:结束,abort:中止,updateall:重新推送。') OLsignStatus = Column(Integer, default=0, comment='签收状态 1.在途中 2.正在派件 3.已签收 4.派送失败 -1 异常数据') OLdata = Column(Text, comment='查询结果') OLlastresult = Column(Text, comment='物流最后状态')
class OrderRefundNotes(Base): __tablename__ = 'OrderRefundNotes' ORNid = Column(String(64), primary_key=True) OMid = Column(String(64), index=True) OPid = Column(String(64), index=True) UserName = Column(String(32), comment='处理人') USid = Column(String(64), comment='用户id, 通常是供应商id') ORNaction = Column(Integer, default=1, comment='审批意见 1 同意,0 提交 -1:拒绝') ORNabo = Column(Text, comment='备注')