You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.0 KiB
Python
38 lines
1.0 KiB
Python
from datetime import datetime
|
|
from typing import List, Optional
|
|
from uuid import UUID
|
|
|
|
from pydantic import Field
|
|
from src.models import CommonParams, DefaultBase, Pagination
|
|
|
|
|
|
class ManpowerCostBase(DefaultBase):
|
|
staff_job_level: str = Field(..., nullable=False)
|
|
salary_per_month_idr: float = Field(..., nullable=False)
|
|
salary_per_day_idr: float = Field(..., nullable=False)
|
|
salary_per_hour_idr: float = Field(..., nullable=False)
|
|
created_at: Optional[datetime] = Field(None, nullable=True)
|
|
updated_at: Optional[datetime] = Field(None, nullable=True)
|
|
created_by: Optional[str] = Field(None, nullable=True)
|
|
updated_by: Optional[str] = Field(None, nullable=True)
|
|
|
|
|
|
class ManpowerCostCreate(ManpowerCostBase):
|
|
pass
|
|
|
|
|
|
class ManpowerCostUpdate(ManpowerCostBase):
|
|
pass
|
|
|
|
|
|
class ManpowerCostRead(ManpowerCostBase):
|
|
id: UUID
|
|
|
|
|
|
class ManpowerCostPagination(Pagination):
|
|
items: List[ManpowerCostRead] = []
|
|
|
|
|
|
class QueryParams(CommonParams):
|
|
items_per_page: Optional[int] = Field(5)
|
|
search: Optional[str] = Field(None) |