From 6ae032291809bd306140f68e919ccec220f9e329 Mon Sep 17 00:00:00 2001 From: haneulai Date: Thu, 22 Jan 2026 15:24:26 +0900 Subject: [PATCH] fix: change PlantBase id and company_id to str type --- app/schemas/plant.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/schemas/plant.py b/app/schemas/plant.py index ffdcbc4..1c3da23 100644 --- a/app/schemas/plant.py +++ b/app/schemas/plant.py @@ -10,8 +10,10 @@ from datetime import datetime class PlantBase(BaseModel): """발전소 기본 정보 스키마""" - id: int - company_id: int + model_config = {"from_attributes": True} + + id: str # DB에서 문자열 형식 사용 + company_id: str # DB에서 문자열 형식 사용 name: str capacity: Optional[float] = Field(None, description="발전 용량 (kW)") location: Optional[str] = Field(None, description="발전소 위치")