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.

16 lines
426 B

from blueprintapp.app import db
class Person(db.Model):
__tablename__ = 'people'
uid = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String, nullable=False)
job = db.Column(db.String, nullable=True)
age = db.Column(db.Integer, nullable=True)
def __repr__(self):
return f'<Person name:{self.name}, Job :{self.job}>'
def get_id(self):
return self.uid