from pydantic import BaseModel, Field
from typing import Optional, List

class CheckInRequest(BaseModel):
    goal_id: int = Field(..., description="체크인할 세부 목표의 ID")
    increment_count: int = Field(..., description="지난 30분 동안 달성한 수치 (없으면 0)")
    user_mood: Optional[str] = Field(None, description="유저의 현재 감정이나 코멘트")

class CheckInResponse(BaseModel):
    status: str
    is_success: bool
    ai_mode: str  
    message: str  
    
class AdjustedGoal(BaseModel):
    goal_id: int
    category: str
    original_target: int
    adjusted_target: int
    
class MorningAssessmentRequest(BaseModel):
    plan_id: int = Field(..., description="평가할 오늘의 계획(daily_plans) ID")
    
class MorningAssessmentResponse(BaseModel):
    motivation_level: str = Field(..., description="'HIGH' 또는 'LOW'")
    score: int = Field(..., description="1~10점 사이의 평가 점수")
    ai_summary: str = Field(..., description="AI가 작성한 오전 상태 요약")
    afternoon_action: str = Field(..., description="오후 목표 유지 또는 수정 제안")
    adjusted_goals: List[AdjustedGoal] = Field(default=[], description="하향 조정된 오후 목표 리스트")