6f1a71e8bd
Deploy / Build Production Runtime Images (push) Successful in 9m5s
Deploy / Deploy Production (push) Successful in 46s
Deploy / Production Browser E2E (push) Failing after 3m39s
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
Deploy / Deploy Staging (push) Has been skipped
38 lines
911 B
Python
38 lines
911 B
Python
from datetime import datetime
|
|
from typing import Literal
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
TitleCategory = Literal["default", "marketing", "tutorial", "story", "promo"]
|
|
|
|
|
|
class ProjectTitleResponse(BaseModel):
|
|
id: str
|
|
workspace_id: str
|
|
project_id: str
|
|
text: str
|
|
category: str
|
|
favorite: bool
|
|
usage_count: int
|
|
is_active: bool
|
|
created_at: datetime
|
|
updated_at: datetime
|
|
|
|
|
|
class ListProjectTitlesResponse(BaseModel):
|
|
items: list[ProjectTitleResponse]
|
|
|
|
|
|
class CreateProjectTitleRequest(BaseModel):
|
|
workspace_id: str
|
|
text: str = Field(min_length=1, max_length=200)
|
|
category: TitleCategory = "default"
|
|
favorite: bool = False
|
|
|
|
|
|
class UpdateProjectTitleRequest(BaseModel):
|
|
text: str | None = Field(default=None, min_length=1, max_length=200)
|
|
category: TitleCategory | None = None
|
|
favorite: bool | None = None
|
|
is_active: bool | None = None
|