from pydantic import BaseModel, Field


class CategoryCreateRequest(BaseModel):
    name: str = Field(min_length=1, max_length=100)
    parent_id: str | int | None = Field(default='all')


class CategoryUpdateRequest(BaseModel):
    name: str = Field(min_length=1, max_length=100)


class FileUpdateRequest(BaseModel):
    filename: str | None = Field(default=None, min_length=1, max_length=255)
    remark: str | None = Field(default=None, max_length=500)
    category_id: str | None = Field(default=None)
