Files
GGThed e15b3c1293
CI - Security, Lint & Tests / validate (push) Failing after 16m22s
fix(audit): centraliser l'horloge UTC
2026-08-17 15:21:08 -04:00

21 lines
786 B
Python

"""Abstract base class for match models (Match + TeamMatch)."""
from app.extensions import db
from app.time_utils import utc_now_naive
class BaseMatch(db.Model):
"""Shared schema for tryout-scoped matches and regular-season team matches."""
__abstract__ = True
title = db.Column(db.String(200), nullable=False)
description = db.Column(db.Text, nullable=True)
date = db.Column(db.Date, nullable=False)
start_time = db.Column(db.Time, nullable=True)
end_time = db.Column(db.Time, nullable=True)
location = db.Column(db.String(200), nullable=True)
status = db.Column(db.String(20), default='scheduled')
created_by = db.Column(db.Integer, db.ForeignKey('users.id'), nullable=False)
created_at = db.Column(db.DateTime, default=utc_now_naive)