Beispiel #1
0
class ReplicaSet(BaseTable):
    __table_name__ = 'replica_set'

    ID = IntegerField(primary_key=True, auto_increment=True)
    host = TextField(not_null=True)
    port = IntegerField(not_null=True)
    connectionId = IntegerField(foreign_key=Connection.ID)
Beispiel #2
0
class User(_CustomBaseTable):
    "The User table"
    __table_name__ = 'users'

    id = IntegerField(primary_key=True)
    name = TextField(not_null=True)
    last_update_time = TextField(not_null=True)
    follower_count = IntegerField(not_null=True)
    mean_like_count = IntegerField(not_null=True)
    mean_comment_count = IntegerField(not_null=True)
    category = TextField(default_value="General")
Beispiel #3
0
class Settings(_CustomBaseTable):
    "The Settings table"
    __table_name__ = 'settings'

    id = IntegerField(primary_key=True, auto_increment=True)
    WAIT_TIME_S = TextField(default_value=settings.WAIT_TIME_S)
    LOAD_EVERY_X_CYCLE = TextField(default_value=settings.LOAD_EVERY_X_CYCLE)
    LOG_LEVEL = TextField(default_value=settings.LOG_LEVEL)
    WAIT_SECS = TextField(default_value=settings.WAIT_SECS)
    LISTENER_WAIT_TIME = TextField(default_value=settings.LISTENER_WAIT_TIME)
Beispiel #4
0
class Manage(BaseTable):
    __table_name__ = 'users'
    #index, site_name, site_url,user_id, user_pw, date, content
    idx = IntegerField(primary_key=True, auto_increment=True)
    site_name = TextField(not_null=True)
    site_url = TextField()
    user_id = TextField(not_null=True)
    user_pw = TextField(not_null=True)
    content = TextField()
    date = TextField()

    def verify_login(self, _password):
        return pbkdf2_sha256.verify(_password, self.user_pw)

    def __repr__():
        return "user_id : %s" % user_id
Beispiel #5
0
class Connection(BaseTable):
    __table_name__ = 'connections'

    # general connection info
    ID = IntegerField(primary_key=True, auto_increment=True)
    name = TextField(not_null=True)
    active = BooleanField(not_null=True, default_value=1)
    type = TextField(not_null=True)

    # db credentials
    dbuser = TextField(not_null=True)
    dbpass = TextField(not_null=True)
    dbname = TextField(not_null=True)

    # ssh credentials
    isSSH = BooleanField(not_null=True, default_value=0)

    # ssl
    isSSL = BooleanField(not_null=True, default_value=0)
Beispiel #6
0
class User(BaseTable):
    __table_name__ = 'users'

    id = IntegerField(primary_key=True, auto_increment=True)
    name = TextField(not_null=True)
    active = BooleanField(not_null=True, default_value=1)
Beispiel #7
0
class Post(BaseTable):
    __table_name__ = 'posts'

    id = IntegerField(primary_key=True)
    name = TextField(not_null=True)
    id_user = IntegerField(foreign_key=User.id)
Beispiel #8
0
class Person(BaseTable):
    __table_name__ = 'person'
    identification = IntegerField(primary_key=True, auto_increment=True)
    name = TextField(not_null=True)
    age = IntegerField()
Beispiel #9
0
class Groups(BaseTable):
    __table_name__ = 'groups'
    id = IntegerField(primary_key=True, auto_increment=True)
    name = TextField(not_null=True)
Beispiel #10
0
class Card(BaseTable):
    __table_name__ = 'card'

    id = IntegerField(primary_key=True, auto_increment=True)
    card_id = TextField(not_null=True)
Beispiel #11
0
class User(BaseTable):
    __table_name__ = 'users'

    id = IntegerField(primary_key=True, auto_increment=True) #автоинкремент на int поле
    name = TextField(not_null=True)
    active = BooleanField(not_null=True, default_value=1)