methodology.py
1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from datetime import datetime
from typing import List, Optional
from pydantic import BaseModel, Field
class MethodologyStepItem(BaseModel):
step_id: Optional[int] = None
step_icon: str = Field(..., max_length=500)
step_name: str = Field(..., max_length=100)
step_order: int = Field(..., ge=1)
step_image: str = Field(..., max_length=500)
class GetMethodologyResponse(BaseModel):
config_id: int
display_status: str
main_title: str
sub_title: str
steps: List[MethodologyStepItem]
updated_at: datetime
class SaveMethodologyStepItem(BaseModel):
step_icon: str = Field(..., max_length=500)
step_name: str = Field(..., max_length=20)
step_order: int = Field(..., ge=1)
step_image: str = Field(..., max_length=500)
class SaveMethodologyRequest(BaseModel):
display_status: str = Field("enable", max_length=20)
main_title: str = Field(..., max_length=100)
sub_title: str = Field(..., max_length=200)
steps: List[SaveMethodologyStepItem] = Field(default_factory=list)
class SaveMethodologyResponse(BaseModel):
config_id: int
updated_at: datetime