30 lines
602 B
Python
30 lines
602 B
Python
from typing import Optional
|
|
|
|
from pydantic import Field
|
|
|
|
from app.core.data_types import UUID7Field
|
|
|
|
from .base import BaseSchema
|
|
|
|
|
|
class ClassificationSchema(BaseSchema):
|
|
id: UUID7Field
|
|
name: str
|
|
is_open: bool
|
|
is_limited: bool
|
|
is_secret: bool
|
|
|
|
|
|
class ClassificationCreateSchema(BaseSchema):
|
|
name: str
|
|
is_open: bool
|
|
is_limited: bool
|
|
is_secret: bool
|
|
|
|
|
|
class ClassificationUpdateSchema(BaseSchema):
|
|
name: Optional[str] = Field(None)
|
|
is_open: Optional[bool] = Field(None)
|
|
is_limited: Optional[bool] = Field(None)
|
|
is_secret: Optional[bool] = Field(None)
|