initial commit - LeDiscord plateforme des copains

This commit is contained in:
EvanChal
2025-08-21 00:28:21 +02:00
commit b7a84a53aa
93 changed files with 16247 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
from pydantic import BaseModel, Field
from typing import Optional, Dict, Any
from datetime import datetime
class SystemSettingBase(BaseModel):
key: str = Field(..., description="Clé unique du paramètre")
value: str = Field(..., description="Valeur du paramètre")
description: Optional[str] = Field(None, description="Description du paramètre")
category: str = Field(default="general", description="Catégorie du paramètre")
class SystemSettingCreate(SystemSettingBase):
pass
class SystemSettingUpdate(BaseModel):
value: str = Field(..., description="Nouvelle valeur du paramètre")
class SystemSettingResponse(SystemSettingBase):
id: int
is_editable: bool
created_at: datetime
updated_at: datetime
class Config:
from_attributes = True
class SettingsCategoryResponse(BaseModel):
category: str
settings: list[SystemSettingResponse]
class Config:
from_attributes = True
class UploadLimitsResponse(BaseModel):
max_album_size_mb: int
max_vlog_size_mb: int
max_image_size_mb: int
max_video_size_mb: int
max_media_per_album: int
allowed_image_types: list[str]
allowed_video_types: list[str]