2019-10-04 22:00:47 +00:00
|
|
|
from app import db, ma
|
2019-10-02 03:14:21 +00:00
|
|
|
import enum
|
|
|
|
|
|
|
|
class Languages(enum.Enum):
|
|
|
|
EN: "English"
|
|
|
|
|
|
|
|
class GameRoom(db.Model):
|
2019-10-02 20:55:09 +00:00
|
|
|
__tablename__ = "game_rooms"
|
|
|
|
__table_args__ = {'extend_existing': True}
|
2019-10-02 03:14:21 +00:00
|
|
|
|
2019-10-02 20:55:09 +00:00
|
|
|
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
|
|
|
|
name = db.Column(db.String(40), nullable=False)
|
|
|
|
description = db.Column(db.String(200), nullable=False)
|
|
|
|
private = db.Column(db.Boolean(), nullable=False, default=False)
|
|
|
|
language = db.Column(db.Enum(Languages), nullable=False)
|
2019-10-02 03:14:21 +00:00
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
pass
|