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
