-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
97 lines (70 loc) · 1.96 KB
/
Copy pathmodels.py
File metadata and controls
97 lines (70 loc) · 1.96 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
from __future__ import annotations
from enum import Enum
from typing import Optional, List, Any
from pydantic import BaseModel, Field
class Status(str, Enum):
ACTIVE = "ACTIVE"
RUNNING = "RUNNING"
COMPLETED = "COMPLETED"
NULL = "NULL"
class RiskLevel(str, Enum):
SAFE = "안전"
CAUTION = "주의"
DANGER = "위험"
class AccountStatus(str, Enum):
NORMAL = "정상"
SUSPICIOUS = "의심"
REPORTED = "신고"
UNKNOWN = "UNKNOWN"
class AmountTier(str, Enum):
SMALL = "소액"
MEDIUM = "중액"
LARGE = "고액"
class Envelope(BaseModel):
"""모든 API 응답의 공통 래핑 구조"""
data: Optional[Any] = None
error: Optional[str] = None
request_id: str
timestamp: str
# ---------- FN-001 ----------
class UploadResponse(BaseModel):
image_id: str
preview_url: str
status: Status
# ---------- FN-002 ----------
class AnalyzeResponse(BaseModel):
image_id: str
risk_level: Optional[RiskLevel] = None
risk_score: Optional[float] = None
keywords: List[str] = Field(default_factory=list)
mode: str = "FULL" # FULL | BASIC_ACCOUNT_ONLY
status: Status
# ---------- FN-003 ----------
class AccountVerifyRequest(BaseModel):
bank_code: str
account_number: str
holder_name: Optional[str] = None
class AccountVerifyResponse(BaseModel):
account_status: AccountStatus
report_count: int = 0
mode: str = "REALTIME" # REALTIME | DELAYED
status: Status
# ---------- FN-004 ----------
class AmountRequest(BaseModel):
amount: float
class AmountResponse(BaseModel):
transfer_id: str
amount: float
amount_tier: Optional[AmountTier] = None
status: Status
# ---------- FN-005 ----------
class TemplateResponse(BaseModel):
template_type: AmountTier
ui_components: List[str]
confirm_steps: int
# ---------- FN-006 ----------
class GuidanceResponse(BaseModel):
transfer_id: str
summary: str
share_link: str
status: Status