updated digiserver 2

This commit is contained in:
ske087
2025-11-12 16:07:03 +02:00
parent 2deb398fd8
commit e5a00d19a5
44 changed files with 2656 additions and 230 deletions

View File

@@ -31,7 +31,12 @@ class Content(db.Model):
uploaded_at = db.Column(db.DateTime, default=datetime.utcnow,
nullable=False, index=True)
# Player relationship (for direct player assignment)
player_id = db.Column(db.Integer, db.ForeignKey('player.id', ondelete='CASCADE'),
nullable=True, index=True)
# Relationships
player = db.relationship('Player', back_populates='contents')
groups = db.relationship('Group', secondary=group_content,
back_populates='contents', lazy='dynamic')