from pydantic import BaseModel
from uuid import UUID
from datetime import datetime, date


class FeedbackResponse(BaseModel):
    feedback_id: int
    store_id: int
    branch_id: int
    datasource_id: int
    customer_name: str
    feedback_posting_date: datetime
    feedback_source : str
    feedback_rating: int
    sentiment: str
    confidence_score: int 
    emotion: str 
    arousal: str
    created_at: datetime

    class Config:
        from_attributes = True 



class TaskResponse(BaseModel):
    task_id: int
    celery_job_id: UUID
    store_id: int
    branch_id: int
    datasource_id: int
    task_status: str
    created_at: datetime

    class Config:
        from_attributes = True  # This allows ORM conversion



class SentimentCountResponse(BaseModel):
    name: date  # This will be `feedback_posting_date`
    positive: int
    negative: int
    mixed: int
