mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-22 05:02:57 +00:00
fix: Refactor initialize.py to handle nested children data during initialization feat: Implement tree structure traversal functions in common_util.py chore: Update requirements.txt to specify sqlalchemy-crud-plus version and add rich refactor: Change API endpoints in dept.ts and menu.ts to return tree structure feat: Add code field to role, dept, and menu interfaces in respective TypeScript files fix: Update dept and role Vue components to display and handle code field docs: Add comprehensive project documentation for FastAPI Vue3 Admin
26 lines
876 B
Python
26 lines
876 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from typing import Optional
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
from app.core.base_schema import BaseSchema
|
|
|
|
|
|
class ApplicationCreateSchema(BaseModel):
|
|
"""应用创建模型"""
|
|
name: str = Field(..., max_length=64, description='应用名称')
|
|
access_url: str = Field(..., max_length=255, description="访问地址")
|
|
icon_url: Optional[str] = Field(None, max_length=300, description="应用图标URL")
|
|
status: bool = Field(True, description="是否启用(True:启用 False:禁用)")
|
|
description: Optional[str] = Field(default=None, max_length=255, description="描述")
|
|
|
|
|
|
class ApplicationUpdateSchema(ApplicationCreateSchema):
|
|
"""应用更新模型"""
|
|
...
|
|
|
|
|
|
class ApplicationOutSchema(ApplicationCreateSchema, BaseSchema):
|
|
"""应用响应模型"""
|
|
model_config = ConfigDict(from_attributes=True)
|