mirror of
https://github.com/fastapi-practices/fastapi-best-architecture.git
synced 2026-09-21 13:12:24 +00:00
Add system notice interface (#487)
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import ConfigDict, Field
|
||||
|
||||
from backend.common.enums import StatusType
|
||||
from backend.common.schema import SchemaBase
|
||||
|
||||
|
||||
class NoticeSchemaBase(SchemaBase):
|
||||
title: str
|
||||
type: int
|
||||
author: str
|
||||
source: str
|
||||
status: StatusType = Field(StatusType.enable)
|
||||
content: str
|
||||
|
||||
|
||||
class CreateNoticeParam(NoticeSchemaBase):
|
||||
pass
|
||||
|
||||
|
||||
class UpdateNoticeParam(NoticeSchemaBase):
|
||||
pass
|
||||
|
||||
|
||||
class GetNoticeListDetails(NoticeSchemaBase):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
id: int
|
||||
created_time: datetime
|
||||
updated_time: datetime | None = None
|
||||
Reference in New Issue
Block a user