from stats import db

class User(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(64), index=True)

def __repr__(self):
    return '<User %r>' % (self.name)

@@ -15,16 +15,17 @@
 ort db%0A%0A
+%0A
 class Us
@@ -136,16 +136,20 @@
 =True)%0A%0A
+    
 def __re
@@ -160,16 +160,20 @@
 (self):%0A
+    
     retu
@@ -201,8 +201,928 @@
 f.name)%0A
+%0A%0Aclass Score(db.Model):%0A    id = db.Column(db.Integer, primary_key=True)%0A    user_id = db.Column(db.Integer, db.ForeignKey('user.id'))%0A    date = db.Column(db.DateTime)%0A    course = db.Column(db.String(64))%0A    tee = db.Column(db.String(64))%0A%0A    # figure out how to have a row for each hole with strokes, green, putts.%0A    # greens should probably be saved as 1 or 0%0A%0A    score = db.Column(db.Integer)%0A    putts = db.Column(db.Integer)%0A    greens = db.Column(db.Integer)%0A    course_handicap = db.Column(db.Integer)%0A    adj_score = db.Column(db.Integer)%0A    handicap_index = db.Column(db.Float)%0A%0A    def __repr__(self):%0A        return '%3CScore %25r%3E' %25 (self.date)%0A%0A%0Aclass Course(db.Model):%0A    id = db.Column(db.Integer, primary_key=True)%0A    name = db.Column(db.String(64))%0A%0A    # need each tee, then each hole for each tee with par, yardage, handicap%0A%0A    def __repr__(self):%0A        return '%3CCourse %25r%3E' %25 (self.name)%0A

add columns to db model