create basic Message model

This commit is contained in:
Sorrel Bri 2019-10-01 20:18:41 -07:00
parent 6a91b1c08a
commit a1c58e40cb

View file

@ -0,0 +1,21 @@
from ..app import db, ma
import enum
class Players(enum.Enum):
BLACK = "The player taking black stones"
WHITE = "The player taking white stones"
class Branch(db.Model):
__table_args__ = {'extend_existing': True}
id = db.Column(db.Integer, primary_key=True)
player = db.Column(db.Enum(Players))
x_point = db.Column(db.Integer)
y_point = db.Column(db.Integer)
move_number = db.Column(db.Integer)
# foreign keys
game = db.Column(db.Integer, db.ForeignKey("game.id"))
def __init__(self):
pass