Initial commit – AufmaßCreater v2.35
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
from app.extensions import db
|
||||
|
||||
class CompanyModule(db.Model):
|
||||
__tablename__ = 'company_modules'
|
||||
|
||||
id = db.Column(db.Integer, primary_key=True)
|
||||
company_id = db.Column(db.Integer, db.ForeignKey('companies.id'), nullable=False)
|
||||
module_id = db.Column(db.Integer, db.ForeignKey('modules.id'), nullable=False)
|
||||
aktiv = db.Column(db.Boolean, default=True)
|
||||
|
||||
company = db.relationship('Company', backref='company_module_list')
|
||||
module = db.relationship('Module', backref='company_assignments')
|
||||
|
||||
__table_args__ = (db.UniqueConstraint('company_id', 'module_id'),)
|
||||
Reference in New Issue
Block a user