feat: добавить отзывы, milestone-платежи, портфолио, skill-tests и верификацию (фичи Upwork/Fiverr)
Фичи конкурентов внедрены: - Reviews API + UI — система отзывов с рейтингом 1-5 звёзд - Milestones (Upwork-style) — разделение escrow на этапы с submit/approve - Portfolio — портфолио фрилансера с превью работ и технологиями - Skill Tests (Upwork-style) — сертификация навыков с тестами - Verification Badges — верификация email/phone/id/bank Модели: Milestone, PortfolioItem, SkillTest/SkillTestResult, Verification
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
"""Схемы отзывов и рейтингов."""
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class ReviewCreate(BaseModel):
|
||||
project_id: str = Field(..., description="ID проекта")
|
||||
reviewee_id: str = Field(..., description="ID того кого оценивают")
|
||||
rating: int = Field(..., ge=1, le=5)
|
||||
comment: str | None = Field(default=None, max_length=2000)
|
||||
|
||||
|
||||
class ReviewResponse(BaseModel):
|
||||
id: str
|
||||
project_id: str
|
||||
reviewer_name: str
|
||||
reviewee_name: str
|
||||
rating: int
|
||||
comment: str | None
|
||||
created_at: str
|
||||
Reference in New Issue
Block a user