from app.extensions import db

class AufmassTyp(db.Model):
    __tablename__ = 'aufmass_typen'

    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(100), nullable=False)
    company_id = db.Column(db.Integer, db.ForeignKey('companies.id'), nullable=True)
    sortierung = db.Column(db.Integer, default=0)

    def __repr__(self):
        return f'<AufmassTyp {self.name}>'
