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