Files
aidoit.top/apps/api/app/modules/projects/schemas.py
T
Pavel Kerndl c0b013f067
CI / frontend (push) Canceled after 0s
CI / api (push) Canceled after 0s
Initialize Aidoit v0.1 monorepo
2026-07-27 18:27:37 +02:00

20 lines
459 B
Python

from datetime import datetime
from typing import Literal
from pydantic import BaseModel, ConfigDict, Field
ProductType = Literal["web", "desktop", "msp"]
class ProjectCreate(BaseModel):
name: str = Field(min_length=1, max_length=120)
description: str = Field(default="", max_length=2000)
product: ProductType = "web"
class ProjectRead(ProjectCreate):
model_config = ConfigDict(from_attributes=True)
id: int
created_at: datetime