Files
FastapiAdmin/backend/app/api/v1/module_system/notice/schema.py
T
zhangtao 4df6241e8b refactor(api): 统一更新接口使用路径参数传递ID
refactor(backend): 重构CRUD基类查询方法去除重复结果

feat(application): 新增应用系统模块基础结构

fix(backend): 修复多处日志记录ID变量名错误

style(backend): 清理无用代码和注释

fix(frontend): 修复用户导入功能参数错误

docs(backend): 更新环境配置示例注释

perf(backend): 优化导出功能数据处理逻辑

test(frontend): 添加任务日志功能开发中提示

chore: 更新角色菜单权限数据
2025-09-05 01:00:38 +08:00

26 lines
873 B
Python

# -*- coding: utf-8 -*-
from typing import Optional
from pydantic import BaseModel, ConfigDict, Field
from app.core.base_schema import BaseSchema
class NoticeCreateSchema(BaseModel):
"""公告通知创建模型"""
notice_title: str = Field(..., max_length=50, description='公告标题')
notice_type: str = Field(..., description='公告类型(1通知 2公告)')
notice_content: str = Field(..., description='公告内容')
status: bool = Field(default=True, description="是否启用(True:启用 False:禁用)")
description: Optional[str] = Field(default=None, max_length=255, description="公告描述")
class NoticeUpdateSchema(NoticeCreateSchema):
"""公告通知更新模型"""
...
class NoticeOutSchema(NoticeCreateSchema, BaseSchema):
"""公告通知响应模型"""
model_config = ConfigDict(from_attributes=True)