23 lines
580 B
Python
23 lines
580 B
Python
from typing import Any
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
from app.schemas.common import NaiveDatetime
|
|
|
|
|
|
class IndustryConfigCreate(BaseModel):
|
|
key: str = Field(..., max_length=64)
|
|
label: str = Field(..., max_length=64)
|
|
icon: str = Field(default="", max_length=64)
|
|
description: str = Field(default="", max_length=256)
|
|
skills: list[dict[str, Any]] = Field(default=[])
|
|
is_active: bool = True
|
|
sort_order: int = 0
|
|
|
|
|
|
class IndustryConfigOut(IndustryConfigCreate):
|
|
id: str
|
|
created_at: NaiveDatetime
|
|
|
|
model_config = {"from_attributes": True}
|