mirror of
https://github.com/fastapi-practices/fastapi-best-architecture.git
synced 2026-09-21 13:12:24 +00:00
* Update return model of query interface * Update tree data return type hints * Update code generation and task return types * Fix inconsistency between ORM query result and schema
39 lines
672 B
Python
39 lines
672 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
from datetime import datetime
|
|
|
|
from pydantic import ConfigDict
|
|
|
|
from backend.common.schema import SchemaBase
|
|
|
|
|
|
class SaveBuiltInConfigParam(SchemaBase):
|
|
name: str
|
|
key: str
|
|
value: str
|
|
|
|
|
|
class ConfigSchemaBase(SchemaBase):
|
|
name: str
|
|
type: str | None
|
|
key: str
|
|
value: str
|
|
is_frontend: bool
|
|
remark: str | None
|
|
|
|
|
|
class CreateConfigParam(ConfigSchemaBase):
|
|
pass
|
|
|
|
|
|
class UpdateConfigParam(ConfigSchemaBase):
|
|
pass
|
|
|
|
|
|
class GetConfigDetail(ConfigSchemaBase):
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
id: int
|
|
created_time: datetime
|
|
updated_time: datetime | None = None
|