feat: Add tagging system for SMS logs and templates
- Introduced a `tag` field in the `SmsLog` entity to categorize SMS messages. - Updated the `SmsService` to handle the new `tag` parameter during SMS dispatch. - Implemented a `SmsTextResolver` service to resolve SMS message templates based on tags. - Created a new `SmsMessageTemplate` entity for editable SMS templates with placeholders. - Added endpoints for managing SMS message templates in the admin panel. - Enhanced existing SMS dispatching methods across various controllers to utilize the tagging system. - Migrated the database to include the new `tag` field and created a seeding command for default SMS templates. - Updated admin API to filter SMS logs by tag and include tag information in responses.
This commit is contained in:
@@ -183,10 +183,19 @@ export interface SmsLog {
|
||||
message: string;
|
||||
status: 'queued' | 'sent' | 'failed';
|
||||
provider: string;
|
||||
tag: string;
|
||||
sent_at: string | null;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface SmsMessageText {
|
||||
tag: string;
|
||||
title: string;
|
||||
body: string;
|
||||
variables: string[];
|
||||
updated_at: number | null;
|
||||
}
|
||||
|
||||
export interface Province {
|
||||
id: number;
|
||||
uuid: string;
|
||||
|
||||
Reference in New Issue
Block a user