mirror of
https://github.com/beak-insights/felicity-lims.git
synced 2025-02-24 08:53:00 +08:00
34 lines
756 B
Python
34 lines
756 B
Python
from datetime import datetime
|
|
from typing import List, Optional
|
|
|
|
from pydantic import ConfigDict
|
|
|
|
from felicity.apps.common.schemas import BaseAuditModel
|
|
from felicity.apps.setup.schemas import Department
|
|
from felicity.apps.user.schemas import Group, User
|
|
|
|
|
|
#
|
|
# Notice Schemas
|
|
#
|
|
class NoticeBase(BaseAuditModel):
|
|
departments: Optional[List[Department]] = []
|
|
groups: Optional[List[Group]] = []
|
|
title: str | None = ""
|
|
body: str | None = ""
|
|
viewers: Optional[List[User]] = []
|
|
expiry: datetime | None = None
|
|
|
|
|
|
class Notice(NoticeBase):
|
|
uid: str | None = None
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
|
|
class NoticeCreate(NoticeBase):
|
|
pass
|
|
|
|
|
|
class NoticeUpdate(NoticeBase):
|
|
pass
|