-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmodels.py
31 lines (25 loc) · 939 Bytes
/
models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from app import db
class College(db.Model):
__tablename__ = 'college'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String())
app_deadline = db.Column(db.String())
rec_deadline = db.Column(db.String())
num_essays = db.Column(db.String())
midyear_report = db.Column(db.String())
acceptance_rate = db.Column(db.String())
platform = db.Column(db.String())
def __init__(self, name, app_deadline, rec_deadline, num_essays, midyear_report, acceptance_rate, platform):
self.name = name
self.app_deadline = app_deadline
self.rec_deadline = rec_deadline
self.num_essays = num_essays
self.midyear_report = midyear_report
self.acceptance_rate = acceptance_rate
self.platform = platform
def __repr__(self):
return '<id {}>'.format(self.id)
def serialize(self):
return {
'id': self.id,
}