ifixkart-admin/Backend/app/schemas/NotificationTemplate.py
Adithiyan bbd3a3e959 feat: initial commit — full platform snapshot
- Backend: FastAPI app with all models, services, schemas, routes
- Admin Panel: Next.js dashboard with all modules
  (CRM, POS, repairs, warranties, billing, notifications, etc.)
- Ecommerce: storefront (submodule) + product catalog
- AI Agents: .agents/ skill library for Antigravity IDE
- Docs: architecture, billing, notification gateway markdown
- Submodules: Backend/OpenWA, Ecommerce/File 2/storefront
2026-10-13 12:59:47 +05:30

46 lines
1.3 KiB
Python

from typing import Optional, List, Dict, Any
from pydantic import BaseModel, Field
class NotificationTemplateBase(BaseModel):
event_key: str = Field(..., max_length=50)
name: str = Field(..., max_length=100)
channel: str = Field(..., max_length=20)
subject: Optional[str] = Field(None, max_length=255)
body_content: str
is_active: bool = True
class NotificationTemplateCreate(NotificationTemplateBase):
pass
class NotificationTemplateUpdate(BaseModel):
name: Optional[str] = Field(None, max_length=100)
subject: Optional[str] = Field(None, max_length=255)
body_content: Optional[str] = None
is_active: Optional[bool] = None
class NotificationTemplateResponse(NotificationTemplateBase):
template_id: str
tenant_id: str
variables: List[str]
created_at: Any
updated_at: Any
class Config:
from_attributes = True
class NotificationTemplatePreviewRequest(BaseModel):
context: Dict[str, Any]
class NotificationTemplatePreviewResponse(BaseModel):
subject: Optional[str]
body: str
class EventVariableSchema(BaseModel):
name: str
description: str
example: str
class EventRegistryResponse(BaseModel):
event_key: str
description: str
variables: List[EventVariableSchema]