from datetime import date, datetime

from pydantic import BaseModel

from app.models.reminder import ReminderStatus


class ReminderCreate(BaseModel):
    title: str
    reminder_at: datetime
    note: str | None = None


class ReminderUpdate(BaseModel):
    title: str | None = None
    reminder_at: datetime | None = None
    note: str | None = None
    status: ReminderStatus | None = None
    is_dismissed: bool | None = None


class ReminderOut(BaseModel):
    id: str
    title: str
    note: str | None
    reminder_at: datetime
    status: ReminderStatus
    is_dismissed: bool
    created_at: datetime
    updated_at: datetime

    model_config = {"from_attributes": True}


class ReminderListOut(BaseModel):
    items: list[ReminderOut]


class ReminderDateQuery(BaseModel):
    date: date
