create basic Move model

This commit is contained in:
Sorrel Bri 2019-10-01 20:24:15 -07:00
parent a1c58e40cb
commit d6b306da99

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