class DeliveryBox(Base): __tablename__ = 'delivery_box' charid = Column(Integer, primary_key=True, nullable=False) charname = Column(String(15)) box = Column(Integer, primary_key=True, nullable=False) slot = Column(Integer, primary_key=True, nullable=False, server_default=text("'0'")) itemid = Column(SmallInteger, nullable=False) itemsubid = Column(SmallInteger, nullable=False, server_default=text("'0'")) quantity = Column(Integer, nullable=False) senderid = Column(Integer, nullable=False, server_default=text("'0'")) sender = Column(String(15)) received = Column(BIT(1), nullable=False) sent = Column(BIT(1), nullable=False) def __repr__(self): return '({addr}) DeliveryBoxRow charid={self.charid}'.format( self=self, addr=hex(id(self))) def __str__(self): return _template.format(self=self, addr=hex(id(self)))
class NmsSubscription(Base): __tablename__ = 'nms_subscriptions' __table_args__ = (Index('status_endDate_composit_idx', 'status', 'endDate'), ) id = Column(BigInteger, primary_key=True, index=True) activationDate = Column(DateTime) creationDate = Column(DateTime, nullable=False) creator = Column(String(255, u'utf8_bin'), nullable=False) deactivationReason = Column(String(255, u'utf8_bin')) endDate = Column(DateTime) firstMessageDayOfWeek = Column(String(255, u'utf8_bin')) modificationDate = Column(DateTime, nullable=False) modifiedBy = Column(String(255, u'utf8_bin'), nullable=False) needsWelcomeMessageViaObd = Column(BIT(1), nullable=False) origin = Column(String(255, u'utf8_bin'), nullable=False) owner = Column(String(255, u'utf8_bin')) secondMessageDayOfWeek = Column(String(255, u'utf8_bin')) startDate = Column(DateTime, index=True) status = Column(String(255, u'utf8_bin'), nullable=False, index=True) subscriber_id_OID = Column(ForeignKey(u'nms_subscribers.id'), nullable=False, index=True) subscriptionId = Column(String(36, u'utf8_bin'), unique=True) subscriptionPack_id_OID = Column(ForeignKey(u'nms_subscription_packs.id'), nullable=False, index=True) nms_subscriber = relationship(u'NmsSubscriber') nms_subscription_pack = relationship(u'NmsSubscriptionPack')
class NmsFlwCdr(Base): __tablename__ = 'nms_flw_cdrs' id = Column(BigInteger, primary_key=True, index=True) callDisconnectReason = Column(String(255, u'utf8_bin')) callDurationInPulses = Column(Integer, nullable=False) callEndTime = Column(DateTime) callId = Column(BigInteger, nullable=False) callStartTime = Column(DateTime) callStatus = Column(Integer, nullable=False) callingNumber = Column(BigInteger, nullable=False, index=True) circle = Column(String(255, u'utf8_bin')) creationDate = Column(DateTime, nullable=False) creator = Column(String(255, u'utf8_bin'), nullable=False) endOfUsagePromptCounter = Column(Integer, nullable=False) finalCallStatus = Column(String(255, u'utf8_bin')) frontLineWorker_id_OID = Column(ForeignKey(u'nms_front_line_workers.id'), index=True) modificationDate = Column(DateTime, nullable=False) modifiedBy = Column(String(255, u'utf8_bin'), nullable=False) operator = Column(String(255, u'utf8_bin')) owner = Column(String(255, u'utf8_bin')) service = Column(String(255, u'utf8_bin'), nullable=False) welcomePrompt = Column(BIT(1)) nms_front_line_worker = relationship(u'NmsFrontLineWorker')
class Listing(Base): __tablename__ = 'Listing' ID = Column(Integer, primary_key=True) Website = Column(String(255), nullable=False) Condition = Column(String(255), nullable=False) ItemID = Column(ForeignKey(u'Item.ID'), nullable=False, index=True) UserID = Column(ForeignKey(u'User.ID', ondelete=u'CASCADE', onupdate=u'CASCADE'), nullable=False, index=True) IsAuction = Column(BIT(1), nullable=False) Created = Column(DateTime, nullable=False, server_default=text("CURRENT_TIMESTAMP")) Item = relationship(u'Item', backref="listings") User = relationship(u'User', backref="listings") __mapper_args__ = { 'polymorphic_identity': 'listing', 'polymorphic_on': IsAuction, 'with_polymorphic': '*' }
class PaymentMode(Base): __tablename__ = 'PAYMENTMODES' id = Column('ID', Integer, primary_key=True) code = Column('CODE', String(255), nullable=False) name = Column('NAME', String(255), nullable=False) backname = Column('BACKNAME', String(255), nullable=False, server_default=text("''")) flags = Column('FLAGS', Integer, nullable=False, server_default=text("'0'")) active = Column('ACTIVE', BIT(1), nullable=False) system = Column('SYSTEM', BIT(1), nullable=False) disporder = Column('DISPORDER', Integer, nullable=False, server_default=text("'0'")) image = Column('IMAGE', MEDIUMBLOB)
class NmsCallContent(Base): __tablename__ = 'nms_call_content' id = Column(BigInteger, primary_key=True, index=True) callDetailRecord_id_OID = Column(ForeignKey(u'nms_flw_cdrs.id', ondelete=u'CASCADE'), index=True) completionFlag = Column(BIT(1)) contentFile = Column(String(255, u'utf8_bin')) contentName = Column(String(255, u'utf8_bin')) correctAnswerEntered = Column(BIT(1)) creationDate = Column(DateTime, nullable=False) creator = Column(String(255, u'utf8_bin'), nullable=False) endTime = Column(DateTime) mobileKunjiCardCode = Column(String(255, u'utf8_bin')) modificationDate = Column(DateTime, nullable=False) modifiedBy = Column(String(255, u'utf8_bin'), nullable=False) owner = Column(String(255, u'utf8_bin')) startTime = Column(DateTime) type = Column(String(255, u'utf8_bin')) nms_flw_cdr = relationship(u'NmsFlwCdr')
class User(Base): __tablename__ = 'User' ID = Column(Integer, primary_key=True) Email = Column(String(255), nullable=False, unique=True) FirstName = Column(String(255), nullable=False) LastName = Column(String(255), nullable=False) Password = Column(Text, nullable=False) Username = Column(String(30), nullable=False, unique=True) IsStaff = Column(BIT(1), nullable=False) DateJoined = Column(DateTime, nullable=False, server_default=text("CURRENT_TIMESTAMP")) LastLogin = Column(DateTime)
class NmsMaCompletionRecord(Base): __tablename__ = 'nms_ma_completion_records' id = Column(BigInteger, primary_key=True, index=True) callingNumber = Column(BigInteger, nullable=False, unique=True) completionCount = Column(Integer, nullable=False) lastDeliveryStatus = Column(String(255, u'utf8_bin')) notificationRetryCount = Column(Integer, nullable=False) score = Column(Integer, nullable=False) sentNotification = Column(BIT(1), nullable=False) creationDate = Column(DateTime) creator = Column(String(255, u'utf8_bin')) modificationDate = Column(DateTime) modifiedBy = Column(String(255, u'utf8_bin')) owner = Column(String(255, u'utf8_bin'))
class NmsImiFileAuditRecord(Base): __tablename__ = 'nms_imi_file_audit_records' id = Column(BigInteger, primary_key=True, index=True) checksum = Column(String(40, u'utf8_bin')) creationDate = Column(DateTime, nullable=False) creator = Column(String(255, u'utf8_bin'), nullable=False) error = Column(String(1024, u'utf8_bin')) fileName = Column(String(255, u'utf8_bin'), index=True) modificationDate = Column(DateTime, nullable=False) modifiedBy = Column(String(255, u'utf8_bin'), nullable=False) owner = Column(String(255, u'utf8_bin')) recordCount = Column(Integer) success = Column(BIT(1), nullable=False) type = Column(String(255, u'utf8_bin'), nullable=False)
class LogFile(Base): __tablename__ = 'log_file' log_file_id = Column(Integer, primary_key=True) tmp_name = Column(String(255), nullable=False) action = Column(Enum(u'upload'), nullable=False, server_default=text("'upload'")) users_users_id = Column(ForeignKey(u'users.id'), nullable=False, index=True) successful = Column(BIT(1), nullable=False) message = Column(Text) users_users = relationship(u'User')