from pydantic import BaseModel, ConfigDict from typing import Optional class RoleNotificationSettingBase(BaseModel): role_name: str event_type: str channel_email: bool = False channel_whatsapp: bool = False class RoleNotificationSettingCreate(RoleNotificationSettingBase): pass class RoleNotificationSettingUpdate(BaseModel): channel_email: Optional[bool] = None channel_whatsapp: Optional[bool] = None class RoleNotificationSettingResponse(RoleNotificationSettingBase): setting_id: str model_config = ConfigDict(from_attributes=True)