system-pri/backend/app/base/models.py

16 lines
406 B
Python

from ..dependencies import db
class Base(db.Model):
__abstract__ = True
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
class Person(db.Model):
__abstract__ = True
first_name = db.Column(db.String(255), index=True, nullable=False)
last_name = db.Column(db.String(255), index=True, nullable=False)
email = db.Column(db.String(120), index=True, nullable=False)