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.
34 lines
689 B
Python
34 lines
689 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
|
|
|
|
|
|
class ScopeBase(DefultBase):
|
|
duration_oh: Optional[int] = Field(None, title="Duration OH")
|
|
crew_number: Optional[int] = Field(1, title="Crew")
|
|
status: Optional[str] = Field("Upcoming")
|
|
type: str
|
|
|
|
|
|
class ScopeCreate(ScopeBase):
|
|
start_date: datetime
|
|
end_date: Optional[datetime] = Field(None)
|
|
|
|
|
|
class ScopeUpdate(ScopeBase):
|
|
pass
|
|
|
|
|
|
class ScopeRead(ScopeBase):
|
|
id: UUID
|
|
start_date: datetime
|
|
end_date: Optional[datetime]
|
|
|
|
|
|
class ScopePagination(Pagination):
|
|
items: List[ScopeRead] = []
|