Files
fastapi-best-architecture/backend/app/admin/schema/config.py
T
Wu Clan 0e7cef5b6c Update system config to dynamic (#447)
* Update system config to be dynamic

* update the configuration interface

* custom parameters are allowed

* update apis

* add more code

* finish

* fix bugs
2024-11-10 07:30:05 +08:00

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