feat(template): define MongoDB schema for message templates and email senders
This commit is contained in:
parent
40e0fafc2c
commit
f7ad36bef8
@ -0,0 +1,26 @@
|
|||||||
|
from beanie import Document
|
||||||
|
from datetime import datetime
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
|
from common.constants.region import UserRegion
|
||||||
|
|
||||||
|
class MessageTemplateDoc(Document):
|
||||||
|
template_id: str
|
||||||
|
tenant_id: Optional[str] = None
|
||||||
|
region: UserRegion
|
||||||
|
subject: str
|
||||||
|
body: str
|
||||||
|
is_active: bool = True
|
||||||
|
created_at: datetime = datetime.utcnow()
|
||||||
|
updated_at: Optional[datetime] = None
|
||||||
|
|
||||||
|
class Settings:
|
||||||
|
name = "message_templates_doc"
|
||||||
|
|
||||||
|
class EmailSenderDoc(Document):
|
||||||
|
tenant_id: str
|
||||||
|
email_senders: list[str] = []
|
||||||
|
is_active: bool = True
|
||||||
|
|
||||||
|
class Settings:
|
||||||
|
name = "email_sender_doc"
|
||||||
Loading…
Reference in New Issue
Block a user