- New models: WarrantyModel, WalletModel, SystemConfigModel - New schemas: WarrantySchema, RefundSchema, SystemConfig, CrmTaskCalendar, NotificationTemplate, NotificationGateway, RepairErp, ReviewModeration, InventoryPos, MultiDashboard, BillingFinance - New services: WarrantyService, RefundService, CrmService, CrmTaskCalendarService, DeliveryService, EmailTemplateService, InventoryPosService, MultiDashboardService, NotificationGatewayService, RepairErpService, ReviewModerationService, SystemConfigService, TemplateService, CreditService - Updated routers: AdminOrder, BillingFinance, Cart, Catalog, Checkout, Crm, InventoryPos, NotificationGateway, RolePermission, ServiceJob, Settings, Storefront, UserCreation - Updated models: Inventory, Notification, Order, Product, Service, Setting, SystemConfig, User - Updated core: database init, invoice generator, main app - Added WarrantyRouter with full CRUD and claim flow
20 lines
576 B
Python
20 lines
576 B
Python
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)
|