mirror of
https://github.com/fastapi-practices/fastapi-best-architecture.git
synced 2026-09-21 21:15:13 +00:00
* Update system config to be dynamic * update the configuration interface * custom parameters are allowed * update apis * add more code * finish * fix bugs
39 lines
691 B
Python
39 lines
691 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
from datetime import datetime
|
|
|
|
from pydantic import ConfigDict
|
|
|
|
from backend.common.schema import SchemaBase
|
|
|
|
|
|
class SaveConfigParam(SchemaBase):
|
|
name: str
|
|
key: str
|
|
value: str
|
|
|
|
|
|
class AnyConfigSchemaBase(SchemaBase):
|
|
name: str
|
|
type: str | None
|
|
key: str
|
|
value: str
|
|
is_frontend: bool
|
|
remark: str | None
|
|
|
|
|
|
class CreateAnyConfigParam(AnyConfigSchemaBase):
|
|
pass
|
|
|
|
|
|
class UpdateAnyConfigParam(AnyConfigSchemaBase):
|
|
pass
|
|
|
|
|
|
class GetAnyConfigListDetails(AnyConfigSchemaBase):
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
id: int
|
|
created_time: datetime
|
|
updated_time: datetime | None = None
|