fix: update SolarLogBase schema to match DB columns (current_kw, today_kwh, status)
This commit is contained in:
parent
126ede33ab
commit
ac3d64ed7f
|
|
@ -26,10 +26,10 @@ class SolarLogBase(BaseModel):
|
||||||
|
|
||||||
id: int
|
id: int
|
||||||
plant_id: str # DB에서 'nrems-01' 같은 문자열 형식 사용
|
plant_id: str # DB에서 'nrems-01' 같은 문자열 형식 사용
|
||||||
|
current_kw: Optional[float] = Field(None, description="현재 발전량 (kW)")
|
||||||
|
today_kwh: Optional[float] = Field(None, description="금일 발전량 (kWh)")
|
||||||
|
status: Optional[str] = Field(None, description="상태")
|
||||||
created_at: datetime # DB 컬럼명과 일치
|
created_at: datetime # DB 컬럼명과 일치
|
||||||
power_output: Optional[float] = Field(None, description="현재 발전량 (kW)")
|
|
||||||
daily_generation: Optional[float] = Field(None, description="일일 발전량 (kWh)")
|
|
||||||
total_generation: Optional[float] = Field(None, description="누적 발전량 (kWh)")
|
|
||||||
|
|
||||||
|
|
||||||
class PlantWithLatestLog(PlantBase):
|
class PlantWithLatestLog(PlantBase):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user