initial commit - LeDiscord plateforme des copains
This commit is contained in:
15
backend/models/information.py
Normal file
15
backend/models/information.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from sqlalchemy import Column, Integer, String, DateTime, Text, Boolean
|
||||
from datetime import datetime
|
||||
from config.database import Base
|
||||
|
||||
class Information(Base):
|
||||
__tablename__ = "informations"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
title = Column(String, nullable=False)
|
||||
content = Column(Text, nullable=False)
|
||||
category = Column(String, default="general") # general, release, upcoming, etc.
|
||||
is_published = Column(Boolean, default=True)
|
||||
priority = Column(Integer, default=0) # Pour l'ordre d'affichage
|
||||
created_at = Column(DateTime, default=datetime.utcnow)
|
||||
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
|
||||
Reference in New Issue
Block a user