from typing import Optional, List
from datetime import datetime
from pydantic import Field, ConfigDict
from src.core.utils.enums import ReminderScheduleStatusTypes
from apps.invoices.schemas.invoice_common import InvoiceSchema
from src.apps.users.schemas.user_common import UserSchema
from apps.customers.schemas.customer_common import CustomerSchema
from apps.customers.schemas.customer_contact import CustomerContactSchema
from apps.merchants.schemas.merchant_common import MerchantSchema
from src.apps.base.schemas.common import ReminderBase


class InvoiceReminderSchema(ReminderBase):
    model_config = ConfigDict(from_attributes=True)
    
    id: int = Field(description="Id of reminder resource")
    user: Optional[UserSchema] = Field(
        default=None,
        description="User Details of the invoice reminder"
    )
    customer: Optional[CustomerSchema] = Field(
        default=None,
        description="Customer details of the invoice reminder"
    )
    payer: Optional[CustomerContactSchema] = Field(
        default=None,
        description="Payer details of the invoice reminder"
    )
    approver: Optional[CustomerContactSchema] = Field(
        default=None,
        description="Approver details of the invoice reminder"
    )
    invoice: Optional[List[InvoiceSchema]] = Field(
        default=None,
        description="Invoice details of the reminder"
    )
