Пример #1
0
class Type(db.Model):
    __tablename__ = 'question_sort'
    id = db.Column(db.Integer,
                   nullable=False,
                   primary_key=True,
                   autoincrement=True)
    sort = db.Column(db.String(16))
    status = db.Column(db.Integer, default=1)
Пример #2
0
class Interactions(db.Model):
	__tablename__ = 'Interactions'
	id = db.Column(db.Integer(), primary_key=True)
	created_at = db.Column(db.DateTime(), default=datetime.utcnow)
	updated_at = db.Column(db.DateTime(), onupdate=datetime.utcnow, default=datetime.utcnow)
	account_id = db.Column(db.Integer(), db.ForeignKey('Accounts.id'))
	session_key = db.Column(db.String())
	client_ip = db.Column(db.String())
	client_url = db.Column(db.String())
	interaction_type = db.Column(db.Enum(MyEnum), nullable=True)
	ab_test = db.Column(db.Boolean(), default=False)
	object_shown = db.Column(db.Boolean(), nullable=True)
Пример #3
0
class Sessions(db.Model):
	__tablename__ = 'Sessions'
	id = db.Column(db.Integer(), primary_key=True)
	created_at = db.Column(db.DateTime(), default=datetime.utcnow)
	updated_at = db.Column(db.DateTime(), onupdate=datetime.utcnow, default=datetime.utcnow)
	account_id = db.Column(db.Integer(), db.ForeignKey('Accounts.id'))
	session_key = db.Column(db.String())
	client_ip = db.Column(db.String())
Пример #4
0
class Accounts(db.Model):
	__tablename__ = 'Accounts'

	id = db.Column(db.Integer(), primary_key=True)
	created_at = db.Column(db.DateTime(), default=datetime.utcnow)
	updated_at = db.Column(db.DateTime(), onupdate=datetime.utcnow, default=datetime.utcnow)
	name = db.Column(db.Unicode())
	account_key = db.Column(db.Unicode())
	ab_test_on = db.Column(db.Boolean())
Пример #5
0
class User(db.Model):
    __tablename__ = 'admin_user'
    id = db.Column(db.Integer,
                   nullable=False,
                   primary_key=True,
                   autoincrement=True)
    username = db.Column(db.String(16))
    passwd = db.Column(db.String(100))
    status = db.Column(db.Integer, default=active_status)
    ctime = db.Column(db.TIMESTAMP, default=datetime.datetime.now())
    utime = db.Column(db.TIMESTAMP, default=datetime.datetime.now())