from pydantic import BaseModel


class TelegramConfigUpdate(BaseModel):
    is_active: bool | None = None
    chat_operasional_id: str | None = None
    thread_penjualan_id: int | None = None
    thread_penerimaan_id: int | None = None
    thread_stock_id: int | None = None
    thread_pos_upload_id: int | None = None
    chat_finansial_id: str | None = None
    thread_penyetoran_id: int | None = None
    thread_expense_id: int | None = None
    thread_pb_id: int | None = None
    thread_penebusan_id: int | None = None
    chat_ga_id: str | None = None
    thread_absensi_id: int | None = None
    thread_housekeeping_id: int | None = None
    thread_sapras_id: int | None = None


class TelegramConfigResponse(BaseModel):
    spbu_id: int
    is_active: bool
    chat_operasional_id: str | None
    thread_penjualan_id: int | None
    thread_penerimaan_id: int | None
    thread_stock_id: int | None
    thread_pos_upload_id: int | None
    chat_finansial_id: str | None
    thread_penyetoran_id: int | None
    thread_expense_id: int | None
    thread_pb_id: int | None
    thread_penebusan_id: int | None
    chat_ga_id: str | None
    thread_absensi_id: int | None
    thread_housekeeping_id: int | None
    thread_sapras_id: int | None

    model_config = {"from_attributes": True}
