mirror of
https://github.com/beak-insights/felicity-lims.git
synced 2025-02-24 08:53:00 +08:00
41 lines
1,011 B
Python
41 lines
1,011 B
Python
from typing import Optional
|
|
|
|
from pydantic import BaseModel, ConfigDict
|
|
|
|
from felicity.apps.analysis.schemas import SampleInDB
|
|
|
|
|
|
#
|
|
# ReportImpress Schemas
|
|
#
|
|
|
|
|
|
class ReportImpressBase(BaseModel):
|
|
state: str | None = None
|
|
sample_uid: str | None = None
|
|
sample: Optional[SampleInDB] = None
|
|
json_content: Optional[dict] = {}
|
|
pdf_content: Optional[bytes] = None
|
|
email_required: bool | None = False
|
|
email_sent: bool | None = False
|
|
sms_required: bool | None = False
|
|
sms_sent: bool | None = False
|
|
generated_by_uid: str | None = None
|
|
created_by_uid: str | None = None
|
|
updated_by_uid: str | None = None
|
|
|
|
|
|
class ReportImpressBaseInDB(ReportImpressBase):
|
|
uid: str | None = None
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
|
|
# Properties to receive via API on creation
|
|
class ReportImpressCreate(ReportImpressBase):
|
|
pass
|
|
|
|
|
|
# Properties to receive via API on update
|
|
class ReportImpressUpdate(ReportImpressBase):
|
|
pass
|