Exemplo n.º 1
0
class RoomType(db.Model):
    __tablename__ = 'room_type'
    id = db.Column(db.INTEGER,primary_key=True)
    r_id = db.Column(db.INTEGER,db.ForeignKey('roominfo_main.room_id'))
    type = db.Column(db.Enum('PC游戏','主机游戏','手机游戏','户外美食','娱乐','其它'))

    def __init__(self,rid,type):
        self.r_id = rid
        self.type = type
Exemplo n.º 2
0
class UserFav(db.Model):
    __tablename__ = 'user_fav'
    id = db.Column(db.INTEGER,primary_key=True)
    uid = db.Column(db.INTEGER,db.ForeignKey('userinfo_main.user_id'))
    fav = db.Column(db.INTEGER,unique=True)

    def __init__(self,uid,fav):
        self.uid = uid
        self.fav = fav
Exemplo n.º 3
0
class UserScore(db.Model):
    __tablename__ = 'user_score'
    id = db.Column(db.INTEGER,primary_key=True)
    u_id = db.Column(db.INTEGER, db.ForeignKey('userinfo_main.user_id'))
    score = db.Column(db.INTEGER)

    def __init__(self,uid,score):
        self.u_id = uid
        self.score = score
Exemplo n.º 4
0
class VideoList(db.Model):
    # __table__ == 'videolist'
    id = db.Column(db.INTEGER,primary_key=True)
    rid = db.Column(db.INTEGER,db.ForeignKey('roominfo_main.room_id'))
    video_url = db.Column(db.String(128))
    poster_url = db.Column(db.String(128))
    video_name = db.Column(db.String(64))

    def __init__(self,rid,v_url,p_url,v_name):
        self.rid = rid
        self.video_url = v_url
        self.poster_url = p_url
        self.video_name = v_name
Exemplo n.º 5
0
class RoomComment(db.Model):
    # __tablename__ == 'room_comment'
    id = db.Column(db.INTEGER,primary_key=True)
    rid = db.Column(db.INTEGER,db.ForeignKey('roominfo_main.room_id'))
    uid = db.Column(db.INTEGER)
    comment = db.Column(db.Text)
    uname = db.Column(db.String(30))

    def __init__(self,rid,comment,uid,uname):
        self.rid = rid
        self.comment = comment
        self.uid = uid
        self.uname = uname
Exemplo n.º 6
0
class RoomGift(db.Model):
    __tablename__ = 'roominfo_gift'
    id = db.Column(db.INTEGER,primary_key=True)
    r_id = db.Column(db.INTEGER,db.ForeignKey('roominfo_main.room_id'))
    free = db.Column(db.INTEGER)
    low = db.Column(db.INTEGER)
    middle = db.Column(db.INTEGER)
    highclass = db.Column(db.INTEGER)

    def __init__(self,r_id,free,low,middle,high):
        self.r_id = r_id
        self.free = free
        self.low = low
        self.middle = middle
        self.high = high
Exemplo n.º 7
0
class RoomCount(db.Model):
    __tablename__ =  'roominfo_count'
    id = db.Column(db.INTEGER,primary_key=True)
    r_id = db.Column(db.INTEGER,db.ForeignKey('roominfo_main.room_id'))
    host_lv = db.Column(db.INTEGER)
    fans_num = db.Column(db.INTEGER)
    exp = db.Column(db.INTEGER)
    p_count = db.Column(db.INTEGER)

    def __init__(self,r_id,lv,fans,exp,pco):
        self.r_id = r_id
        self.host_lv = lv
        self.fans_num = fans
        self.exp = exp
        self.p_count = pco
Exemplo n.º 8
0
class UserOther(db.Model):
    __tablename__ = 'user_other_info'
    id = db.Column(db.INTEGER,primary_key=True)
    uid = db.Column(db.INTEGER,db.ForeignKey('userinfo_main.user_id'))
    sex = db.Column(db.Enum('男','女','保密'),nullable=True)
    phone = db.Column(db.String(11),nullable=True)
    city = db.Column(db.String(15),nullable=True)
    ps = db.Column(db.Text,nullable=True)

    def __init__(self,uid,sex,phone,city,ps):
        self.uid = uid
        self.sex = sex
        self.phone = phone
        self.city = city
        self.ps = ps
Exemplo n.º 9
0
class UserGift(db.Model):
    __tablename__ = 'userinfo_gift'
    id = db.Column(db.INTEGER,primary_key=True)
    u_id = db.Column(db.INTEGER, db.ForeignKey('userinfo_main.user_id'))
    free = db.Column(db.INTEGER)
    low = db.Column(db.INTEGER)
    middle = db.Column(db.INTEGER)
    highclass = db.Column(db.INTEGER)

    def __init__(self,u_id,free,low,middle,high):
        self.u_id = u_id
        self.free = free
        self.low = low
        self.middle = middle
        self.high = high