recreate basic Message model
This commit is contained in:
parent
d6b306da99
commit
52ad450fb9
1 changed files with 5 additions and 7 deletions
|
@ -5,17 +5,15 @@ class Players(enum.Enum):
|
||||||
BLACK = "The player taking black stones"
|
BLACK = "The player taking black stones"
|
||||||
WHITE = "The player taking white stones"
|
WHITE = "The player taking white stones"
|
||||||
|
|
||||||
class Branch(db.Model):
|
class Message(db.Model):
|
||||||
__table_args__ = {'extend_existing': True}
|
__table_args__ = {'extend_existing': True}
|
||||||
|
|
||||||
id = db.Column(db.Integer, primary_key=True)
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
player = db.Column(db.Enum(Players))
|
date = db.Column(db.DateTime())
|
||||||
x_point = db.Column(db.Integer)
|
content = db.Column(db.String(200))
|
||||||
y_point = db.Column(db.Integer)
|
|
||||||
move_number = db.Column(db.Integer)
|
|
||||||
|
|
||||||
# foreign keys
|
# foreing key
|
||||||
game = db.Column(db.Integer, db.ForeignKey("game.id"))
|
game = db.Column(db.Integer, db.ForeignKey("move.id"))
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
Loading…
Reference in a new issue