- Backend: FastAPI app with all models, services, schemas, routes - Admin Panel: Next.js dashboard with all modules (CRM, POS, repairs, warranties, billing, notifications, etc.) - Ecommerce: storefront (submodule) + product catalog - AI Agents: .agents/ skill library for Antigravity IDE - Docs: architecture, billing, notification gateway markdown - Submodules: Backend/OpenWA, Ecommerce/File 2/storefront
46 lines
1.2 KiB
Python
46 lines
1.2 KiB
Python
from datetime import datetime
|
|
from typing import Optional, List
|
|
from pydantic import BaseModel, Field
|
|
|
|
class ReviewCreate(BaseModel):
|
|
customer_id: str
|
|
target_type: str = Field(..., description="PRODUCT, REPAIR_SERVICE, TECHNICIAN, STORE")
|
|
target_id: str
|
|
rating: int = Field(..., ge=1, le=5)
|
|
title: Optional[str] = None
|
|
comment: str
|
|
order_id: Optional[str] = None
|
|
repair_ticket_id: Optional[str] = None
|
|
|
|
class ReviewModerateAction(BaseModel):
|
|
status: str = Field(..., description="APPROVED, REJECTED, or FLAGGED")
|
|
reason: Optional[str] = None
|
|
|
|
class ReviewResponse(BaseModel):
|
|
review_id: str
|
|
tenant_id: str
|
|
customer_id: str
|
|
target_type: str
|
|
target_id: str
|
|
order_id: Optional[str] = None
|
|
repair_ticket_id: Optional[str] = None
|
|
rating: int
|
|
title: Optional[str] = None
|
|
comment: str
|
|
moderation_status: str
|
|
moderation_reason: Optional[str] = None
|
|
is_verified_buyer: bool
|
|
is_published: bool
|
|
csat_score: float
|
|
created_at: datetime
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
class CSATMetricsResponse(BaseModel):
|
|
target_type: str
|
|
target_id: str
|
|
average_rating: float
|
|
total_reviews: int
|
|
verified_reviews_count: int
|
|
csat_index_percentage: float
|