- item/supplier/quotation/quotation_setting CRUD·service·router 추가 - item protocol delivery_type str→int (ERD/스키마 SMALLINT 일치) - DeliveryType enum + 한글 라벨, 공용 GET /v1/enums (도메인 코드 메타데이터) - CompanyBrief → CompanyData 로 *Data 네이밍 통일 - CORS: WebServerConfig.client_url(단일) 도입 (config_models/router) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
49 lines
1.2 KiB
Python
49 lines
1.2 KiB
Python
import uuid
|
|
from datetime import datetime
|
|
from typing import Optional
|
|
|
|
from pydantic import ConfigDict
|
|
|
|
from common.models.gmodel import Res_WebPacketProtocol, WebPacketProtocol
|
|
|
|
|
|
class QuotationSettingProtocol(WebPacketProtocol):
|
|
pass
|
|
|
|
|
|
class Req_CreateQuotationSetting(QuotationSettingProtocol):
|
|
target_margin_rate: float
|
|
anchoring_value: float = 0.01
|
|
card_count: int = 3
|
|
|
|
|
|
class Req_UpdateQuotationSetting(QuotationSettingProtocol):
|
|
target_margin_rate: Optional[float] = None
|
|
anchoring_value: Optional[float] = None
|
|
card_count: Optional[int] = None
|
|
|
|
|
|
class QuotationSettingData(WebPacketProtocol):
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
qt_setting_id: uuid.UUID
|
|
user_id: Optional[uuid.UUID] = None
|
|
target_margin_rate: float
|
|
anchoring_value: float
|
|
card_count: int
|
|
created_at: Optional[datetime] = None
|
|
updated_at: Optional[datetime] = None
|
|
|
|
|
|
class Res_QuotationSetting(Res_WebPacketProtocol):
|
|
setting: Optional[QuotationSettingData] = None
|
|
|
|
|
|
class Res_QuotationSettingList(Res_WebPacketProtocol):
|
|
settings: list[QuotationSettingData] = []
|
|
total: int = 0
|
|
|
|
|
|
class Res_DeleteQuotationSetting(Res_WebPacketProtocol):
|
|
pass
|