Add system notice interface (#487)

This commit is contained in:
dividduang
2025-01-14 12:45:33 +08:00
committed by GitHub
parent 1e855dbb86
commit 64ee74bb38
7 changed files with 263 additions and 0 deletions
+33
View File
@@ -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