예제 #1
0
class UserInvitation(Base):
    """用户邀请记录表"""
    __tablename__ = 'UserInvitation'
    UINid = Column(String(64), primary_key=True)
    USInviter = Column(String(64), comment='邀请人')
    USInvited = Column(String(64), comment='被邀请人')
    UINapi = Column(String(100), comment='触发此次记录的api')
예제 #2
0
class PermissionItems(Base):
    """权限标签"""
    __tablename__ = 'PermissionItems'
    PIid = Column(String(64), primary_key=True)
    # PIType = Column(Integer, comment='权限标签')
    PIname = Column(Text, comment='权限名称')
    PIstatus = Column(Integer, default=1, comment='权限状态 1: 正常, -1: 被冻结')
예제 #3
0
class UserDistribute(Base):
    """用户归属分配"""
    __tablename__ = 'UserDistribute'
    UDid = Column(String(64), primary_key=True)
    UDinputer = Column(String(64), comment='操作人')
    UDinperson = Column(String(64), comment='被执行人')
    UDexecutor = Column(String(64), comment='管理者')
예제 #4
0
class ProductVerifier(Base):
    """
    核销员
    """
    __tablename__ = 'ProductVerifier'
    PVid = Column(String(64), primary_key=True)
    SUid = Column(String(64), comment='供应商')
    PVphone = Column(String(13), nullable=False)
예제 #5
0
class ProductVerifiedRecord(Base):
    """核销记录"""
    __tablename__ = 'ProductVerifiedRecord'
    PVRid = Column(String(64), primary_key=True)
    ownerId = Column(String(64), comment='门票持有者id')
    VerifierId = Column(String(64), comment='验证人员id')
    OMid = Column(String(64), comment='订单id')
    param = Column(Text, comment='扫描到的原参数')
예제 #6
0
class CoveredCertifiedNameLog(Base):
    """覆盖已认证姓名记录表"""
    __tablename__ = 'CoveredCertifiedNameLog'
    CNLid = Column(String(64), primary_key=True)
    OldName = Column(String(255), comment='原真实姓名')
    NewName = Column(String(255), comment='替换后真实姓名')
    OldIdentityNumber = Column(String(64), comment='原身份证号')
    NewIdentityNumber = Column(String(64), comment='替换后身份证号')
예제 #7
0
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 转发')
    UItype = Column(Integer, default=1, comment='积分变动类型 1 收入 2 支出')
예제 #8
0
class UserMedia(Base):
    """
    用户身份证图片表
    """
    __tablename__ = 'UserMedia'
    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: 身份证反面')
예제 #9
0
class Activation(Base):
    """
    活跃度
    """
    __tablename__ = 'Activation'
    ATid = Column(String(64), primary_key=True)
    USid = Column(String(64))
    ATTid = Column(String(64), comment='活跃度类型:分享新用户,分享老用户,发布内容,加精,打赏,提交联动平台账号')
    ATnum = Column(Integer, default=0, comment='活跃度')
예제 #10
0
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')
예제 #11
0
class Agreement(Base):
    """规则/协议"""
    __tablename__ = 'Agreement'
    AMid = Column(String(64), primary_key=True)
    AMcontent = Column(Text, comment='协议内容')
    AMtype = Column(Integer,
                    default=0,
                    comment='协议类型 0:转让协议 1: 退款规则 2:门票规则 3:活跃分规则')
    AMname = Column(String(256), comment='规则名')
예제 #12
0
class Permission(Base):
    """审批流处理身份及层级"""
    __tablename__ = "Permission"
    PEid = Column(String(64), primary_key=True)
    # ADid = Column(String(64), nullable=False, comment='管理员id')
    # PEtype = Column(Integer, nullable=False, comment='审批流类型 1: 成为代理商审批 2:商品上架审批 3:订单退换货审批, 4: 提现审批 5: 用户资讯发布审批')
    PELevel = Column(Integer, nullable=False, comment='审批层级 1-10')
    PIid = Column(String(64), comment='权限id')
    PTid = Column(String(64), comment='审批流类型id')
예제 #13
0
class ProductOrderActivation(Base):
    """
    门票订单活跃度关联表
    """
    __tablename__ = 'ProductOrderActivation'
    POAid = Column(String(64), primary_key=True)
    OMid = Column(String(64), comment='订单')
    ATid = Column(String(64), comment='活跃度')
    POAcontent = Column(String(64),
                        comment='如果是随笔,随笔实体id 分享: 分享人id 加精/打赏: 管理员id')
예제 #14
0
class PermissionNotes(Base):
    """审批流变更记录表"""
    __tablename__ = 'PermissionNotes'
    PNid = Column(String(64), primary_key=True)
    ADid = Column(String(64), comment='操作人id')
    PNcontent = Column(String(64), comment='被操作的权限')
    PINaction = Column(Text, comment='权限变更内容')
    PNType = Column(Integer,
                    default=0,
                    comment='权限变更类型 0 权限标签 1 审批流类型 2 审批流处理身份及层级')
예제 #15
0
class SharingParameters(Base):
    """短分享参数"""
    __tablename__ = 'SharingParameters'
    SPSid = Column(Integer,
                   autoincrement=True,
                   primary_key=True,
                   comment='主键,同时作为缩短的参数')
    USid = Column(String(64), comment='用户id')
    SPScontent = Column(Text, comment='分享的原参数')
    SPSname = Column(String(30), comment='分享的参数名 如: secret_usid, plid')
예제 #16
0
class UserLocation(Base):
    __tablename__ = 'UserLocation'
    ULid = Column(String(64), primary_key=True)
    ULformattedAddress = Column(Text, comment='预测地址')
    ULcountry = Column(Text, comment='国家')
    ULprovince = Column(Text, comment='身份')
    ULcity = Column(Text, comment='城市')
    ULdistrict = Column(Text, comment='区县')
    ULresult = Column(Text, comment='查询结果')
    ULlng = Column(Text, comment='维度')
    ULlat = Column(Text, comment='经度')
    USid = Column(String(64), comment='用户id')
예제 #17
0
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='开票信息的银行账户')
예제 #18
0
class ProductMonthSaleValue(Base):
    """商品月销量"""
    __tablename__ = 'ProductMonthSaleValue'
    PMSVid = Column(String(64), primary_key=True)
    PRid = Column(String(64), nullable=False, comment='商品id')
    PMSVnum = Column(BIGINT, default=0)
    PMSVfakenum = Column(BIGINT, default=0)

    @orm.reconstructor
    def __init__(self):
        super(ProductMonthSaleValue, self).__init__()
        self.hide('PMSVfakenum')
        if isinstance(self.PMSVnum, int) and isinstance(self.PMSVfakenum, int):
            self.PMSVnum = max(self.PMSVnum, self.PMSVfakenum)
예제 #19
0
class UserLoginTime(Base):
    __tablename__ = 'UserLoginTime'
    ULTid = Column(String(64), primary_key=True)
    USid = Column(String(64), nullable=False, comment='用户id')
    USTip = Column(String(64), comment='登录ip地址')
    ULtype = Column(Integer, default=1, comment='登录用户类型 1: 用户,2 管理员')
    OSVersion = Column(String(25), comment='手机系统版本')
    PhoneModel = Column(String(16), comment='手机型号')
    WechatVersion = Column(String(16), comment='微信版本')
    NetType = Column(String(10), comment='用户网络')
    UserAgent = Column(Text, comment='浏览器User-Agent')
예제 #20
0
class CashFlow(Base):
    """提现流水"""
    __tablename__ = 'CashFlow'
    CFWid = Column(String(64), primary_key=True)
    CNid = Column(String(64), nullable=False, comment='提现申请id')
    partner_trade_no = Column(String(64), comment='微信商户订单号')
    response = Column(Text, comment='微信返回的原数据')
    status = Column(String(64),
                    comment="代付订单状态:PROCESSING, SUCCESS, FAILED, BANK_FAIL")
    reason = Column(Text, comment='失败原因')
    amout = Column(Integer, comment='提现金额(单位:分)')
    cmms_amt = Column(Integer, default=0, comment='手续费, 提现到银行卡产生(单位:分)')
    CFWfrom = Column(Integer, default=0, comment='提现渠道 0, 微信零钱 1, 银行卡')
예제 #21
0
class Admin(Base):
    """
    管理员
    """
    __tablename__ = 'Admin'
    ADid = Column(String(64), primary_key=True)
    ADnum = Column(Integer, autoincrement=True)
    ADname = Column(String(255), comment='管理员名')
    ADtelephone = 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: 已删除}')
예제 #22
0
class UserAccessApi(Base):
    """记录访问api的信息"""
    __tablename__ = 'UserAccessApi'
    UAAid = Column(String(64), primary_key=True)
    USid = Column(String(64), nullable=False, comment='用户id')
    ULA = Column(String(64), comment='请求api地址')
    USTip = Column(String(64), comment='登录ip地址')
    OSVersion = Column(String(25), comment='手机系统版本')
    PhoneModel = Column(String(16), comment='手机型号')
    WechatVersion = Column(String(16), comment='微信版本')
    NetType = Column(String(10), comment='用户网络')
예제 #23
0
class Approval(Base):
    """审批流"""
    __tablename__ = 'Approval'
    AVid = Column(String(64), primary_key=True)
    AVname = Column(String(255), nullable=False, comment='审批流名称')
    # AVtype = Column(Integer, default=1, comment='审批流类型 1: 成为代理商审批 2:商品上架审批 3:订单退换货审批, 4: 提现审批 5: 用户资讯发布审批')
    AVstartid = Column(String(64), nullable=False, comment='发起人')
    AVlevel = Column(Integer, comment='当前审批人等级')
    AVstatus = Column(Integer,
                      default=0,
                      comment='审批状态 -20 已取消 -10 拒绝 0 未审核 10审核通过')
    AVcontent = Column(String(64), comment='待审批的对象')
    PTid = Column(String(64), comment='审批流类型id')
    AVcontentdetail = Column(LONGTEXT, comment='审批对象 当时数据')
    AVstartdetail = Column(Text, comment='审批流发起人当时详情')
예제 #24
0
class ApprovalNotes(Base):
    """审批流处理记录"""
    __tablename__ = 'ApprovalNotes'
    ANid = Column(String(64), primary_key=True)
    AVid = Column(String(64), comment='审批流id')
    AVadname = Column(Text, comment='处理人姓名')
    ADid = Column(String(64), comment='处理人id')
    ANaction = Column(Integer, default=1, comment='审批意见 1 同意,0 提交 -1:拒绝')
    ANabo = Column(Text, comment='审批备注')
    ANfrom = Column(Integer, comment='发起申请时的来源 0:平台, 10: 供应商, 20:普通用户')
예제 #25
0
class MiniProgramBanner(Base):
    """小程序轮播图"""
    __tablename__ = 'MiniProgramBanner'
    MPBid = Column(String(64), primary_key=True)
    ADid = Column(String(64), comment='创建者id')
    MPBpicture = Column(Text, nullable=False, comment='图片', url=True)
    MPBsort = Column(Integer, comment='顺序')
    MPBshow = Column(Boolean, default=True, comment='是否展示')
    MPBposition = Column(Integer, default=0, comment='轮播图位置 0: 首页')
    contentlink = Column(LONGTEXT, comment='跳转链接')
예제 #26
0
class UserWallet(Base):
    """用户钱包"""
    __tablename__ = 'UserWallet'
    UWid = Column(String(64), primary_key=True)
    USid = Column(String(64), comment='用户id')
    CommisionFor = Column(Integer, default=20, comment='0 平台, 10 供应商, 20 普通用户')
    UWbalance = Column(DECIMAL(precision=28, scale=2), comment='用户账户余额')
    UWtotal = Column(DECIMAL(precision=28, scale=2), comment='用户账户总额')
    UWcash = Column(DECIMAL(precision=28, scale=2), comment='用户账号可提现余额')
    UWexpect = Column(DECIMAL(precision=28, scale=2), comment='用户账号预期到账金额')
예제 #27
0
class OrderPay(Base):
    """
    付款流水
    """
    __tablename__ = 'OrderPay'
    OPayid = Column(String(64), primary_key=True)
    OPayno = Column(String(64), index=True,
                    comment='交易号, 自己生成')  # 即out_trade_no
    OPayType = Column(Integer, default=0, comment='支付方式 0 微信 10 支付宝 20 活跃分')
    OPaytime = Column(DateTime, comment='付款时间')
    OPayMount = Column(DECIMAL(precision=28, scale=2), comment='付款金额')
    OPaysn = Column(String(64), comment='第三方支付流水')
    OPayJson = Column(Text, comment='回调原文')
    OPaymarks = Column(String(255), comment='备注')
예제 #28
0
class UserSubCommission(Base):
    """用户分佣等级"""
    __tablename__ = 'UserSubCommission'
    USCid = Column(String(64), primary_key=True)
    USid = Column(String(64), nullable=False, comment='用户id')
    USCsuperlevel = Column(Integer, default=0, comment='分佣等级')
    USCsupper1 = Column(String(64), comment='一级分佣人员')
    USCsupper2 = Column(String(64), comment='二级分佣人员')
    USCsupper3 = Column(String(64), comment='三级分佣人员')
예제 #29
0
class AdminActions(Base):
    """
    记录管理员行为
    """
    __tablename__ = 'AdminAction'
    AAid = Column(String(64), primary_key=True)
    ADid = Column(String(64), comment='管理员id')
    AAaction = Column(Integer,
                      default=1,
                      comment='管理员行为, {1: 添加, 2: 删除 3: 修改}')
    AAmodel = Column(String(255), comment='操作的数据表')
    AAdetail = Column(LONGTEXT, comment='请求的data')
    AAkey = Column(String(255), comment='操作数据表的主键的值')
예제 #30
0
class ActivationType(Base):
    """
    活跃度类型
    """
    __tablename__ = 'ActivationType'
    ATTid = Column(String(64), primary_key=True, comment='该id需要脚本生成固定id')
    ATTname = Column(String(256), comment='获取积分方式简述')
    ATTnum = Column(Integer, default=0, comment='该获取方式获取的活跃度')
    ATTupperLimit = Column(Integer, default=0, comment='该获取方式获取的活跃度上限')
    ATTdayUpperLimit = Column(Integer, default=0, comment='该获取方式每日获取的活跃度上限')
    # ATTtype = Column(Integer, default=0, comment='是否信息绑定')
    # ATTicon = Column(Text, comment='信息绑定的icon')
    ADid = Column(String(64), comment='创建管理员id')

    @orm.reconstructor
    def __init__(self):
        super(ActivationType, self).__init__()
        self.hide('ADid')