- 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
12 lines
585 B
Python
12 lines
585 B
Python
from sqlalchemy import Column, String, Boolean
|
|
from app.core.database.db_session import Base
|
|
import ulid
|
|
|
|
class RoleNotificationSetting(Base):
|
|
__tablename__ = "role_notification_settings"
|
|
|
|
setting_id = Column(String(26), primary_key=True, default=lambda: str(ulid.ULID()))
|
|
role_name = Column(String(100), nullable=False) # e.g., 'Admin', 'Manager', 'Technician'
|
|
event_type = Column(String(100), nullable=False) # e.g., 'NEW_ORDER_ALERT', 'SERVICE_BOOKED_INTERNAL'
|
|
channel_email = Column(Boolean, default=False)
|
|
channel_whatsapp = Column(Boolean, default=False)
|