mirror of
https://github.com/beak-insights/felicity-lims.git
synced 2025-02-23 16:33:11 +08:00
43 lines
1.1 KiB
Python
43 lines
1.1 KiB
Python
from datetime import datetime
|
|
from typing import Dict, Optional
|
|
|
|
from apps.analysis.schemas import SampleInDB
|
|
from core.uid_gen import FelicityIDType
|
|
from pydantic import BaseModel
|
|
|
|
#
|
|
# ReportImpress Schemas
|
|
#
|
|
|
|
|
|
class ReportImpressBase(BaseModel):
|
|
state: Optional[str] = None
|
|
sample_uid: Optional[FelicityIDType] = None
|
|
sample: Optional[SampleInDB] = None
|
|
json_content: Optional[Dict] = {}
|
|
pdf_content: Optional[bytes] = None
|
|
email_required: Optional[bool] = False
|
|
email_sent: Optional[bool] = False
|
|
sms_required: Optional[bool] = False
|
|
sms_sent: Optional[bool] = False
|
|
generated_by_uid: Optional[FelicityIDType] = None
|
|
created_by_uid: Optional[FelicityIDType] = None
|
|
updated_by_uid: Optional[FelicityIDType] = None
|
|
date_generated: Optional[datetime] = False
|
|
|
|
|
|
class ReportImpressBaseInDB(ReportImpressBase):
|
|
uid: Optional[FelicityIDType] = None
|
|
|
|
class Config:
|
|
orm_mode = True
|
|
|
|
|
|
# Properties to receive via API on creation
|
|
class ReportImpressCreate(ReportImpressBase):
|
|
pass
|
|
|
|
|
|
# Properties to receive via API on update
|
|
class ReportImpressUpdate(ReportImpressBase):
|
|
pass
|