You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
325 B
15 lines
325 B
from app import db
|
|
|
|
|
|
class Person(db.Model):
|
|
__tablename__ = 'person'
|
|
|
|
pid = db.Column(db.Integer, primary_key=True)
|
|
name = db.Column(db.Text, nullable=False)
|
|
age = db.Column(db.Integer)
|
|
job = db.Column(db.Text)
|
|
|
|
def __repr__(self):
|
|
return f'Person with name: {self.name} and age {self.age}'
|
|
|