31 lines
588 B
Python
31 lines
588 B
Python
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from datetime import datetime
|
||
|
|
from decimal import Decimal
|
||
|
|
|
||
|
|
from pydantic import BaseModel, ConfigDict
|
||
|
|
|
||
|
|
|
||
|
|
class ReimbursementCreate(BaseModel):
|
||
|
|
request_no: str
|
||
|
|
employee_id: str
|
||
|
|
title: str
|
||
|
|
category: str
|
||
|
|
amount: Decimal
|
||
|
|
reason: str | None = None
|
||
|
|
|
||
|
|
|
||
|
|
class ReimbursementRead(BaseModel):
|
||
|
|
model_config = ConfigDict(from_attributes=True)
|
||
|
|
|
||
|
|
id: str
|
||
|
|
request_no: str
|
||
|
|
employee_id: str
|
||
|
|
title: str
|
||
|
|
category: str
|
||
|
|
status: str
|
||
|
|
amount: Decimal
|
||
|
|
reason: str | None
|
||
|
|
created_at: datetime
|
||
|
|
updated_at: datetime
|