Initial commit: Robot ökoszisztéma v2.0 - Stabilizált jármű és szerviz robotok
This commit is contained in:
37
code-server-config/data/User/History/-7a78fe9d/0L8o.py
Executable file
37
code-server-config/data/User/History/-7a78fe9d/0L8o.py
Executable file
@@ -0,0 +1,37 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
from typing import Optional, List
|
||||
from datetime import datetime
|
||||
from app.models.social import ModerationStatus, SourceType
|
||||
|
||||
# --- Alap Sémák ---
|
||||
|
||||
class ServiceProviderBase(BaseModel):
|
||||
name: str
|
||||
address: Optional[str] = None
|
||||
category: Optional[str] = None
|
||||
source: SourceType = SourceType.manual
|
||||
|
||||
class ServiceProviderCreate(ServiceProviderBase):
|
||||
pass
|
||||
|
||||
class ServiceProviderResponse(ServiceProviderBase):
|
||||
id: int
|
||||
status: ModerationStatus
|
||||
validation_score: int # Látni kell a pontszámot
|
||||
evidence_image_path: Optional[str] = None
|
||||
added_by_user_id: Optional[int] = None
|
||||
created_at: datetime
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
# --- Voting & Gamification Sémák ---
|
||||
|
||||
class VoteCreate(BaseModel):
|
||||
vote_value: int # Csak a +1 vagy -1 kell, a user_id jön a tokenből, a provider_id az URL-ből
|
||||
|
||||
class LeaderboardEntry(BaseModel):
|
||||
username: str
|
||||
points: int
|
||||
rank: int
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
Reference in New Issue
Block a user