Files
fastapi-best-architecture/backend/app/admin/schema/api.py
T
Wu Clan eb8dfda8fa Update CRUDBase to sqlalchemy-crud-plus (#317)
* Update CRUDBase to dependent package

* Update sqla crud plus to 0.0.2
2024-04-27 23:07:40 +08:00

32 lines
692 B
Python

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from datetime import datetime
from pydantic import ConfigDict, Field
from backend.common.enums import MethodType
from backend.common.schema import SchemaBase
class ApiSchemaBase(SchemaBase):
name: str
method: MethodType = Field(default=MethodType.GET, description='请求方法')
path: str = Field(..., description='api路径')
remark: str | None = None
class CreateApiParam(ApiSchemaBase):
pass
class UpdateApiParam(ApiSchemaBase):
pass
class GetApiListDetails(ApiSchemaBase):
model_config = ConfigDict(from_attributes=True)
id: int
created_time: datetime
updated_time: datetime | None = None