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.
35 lines
824 B
Python
35 lines
824 B
Python
|
|
from datetime import datetime
|
|
from typing import List, Optional
|
|
from uuid import UUID
|
|
|
|
from pydantic import Field
|
|
from src.models import DefultBase, Pagination
|
|
from src.auth.service import CurrentUser
|
|
|
|
|
|
class MasterdataBase(DefultBase):
|
|
discount_rate: Optional[float]
|
|
inflation_rate: Optional[float]
|
|
manhours_rate: Optional[float]
|
|
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 MasterDataCreate(MasterdataBase):
|
|
pass
|
|
|
|
|
|
class MasterDataUpdate(MasterdataBase):
|
|
pass
|
|
|
|
|
|
class MasterDataRead(MasterdataBase):
|
|
id: UUID
|
|
|
|
|
|
class MasterDataPagination(Pagination):
|
|
items: List[MasterDataRead] = []
|