refactor: Add description, provider, and settings fields to NotificationChannelV2 model

This commit is contained in:
Marvin Zhang
2024-07-17 17:39:07 +08:00
parent 8c79d51a5a
commit a5104663e8
2 changed files with 38 additions and 1 deletions

View File

@@ -4,5 +4,16 @@ type NotificationChannelV2 struct {
any `collection:"notification_channels"`
BaseModelV2[NotificationChannelV2] `bson:",inline"`
Name string `json:"name" bson:"name"`
Description string `json:"description" bson:"description"`
Type string `json:"type" bson:"type"`
Provider string `json:"provider" bson:"provider"`
MailSettings struct {
SMTPServer string `json:"smtp_server" bson:"smtp_server"`
SMTPPort string `json:"smtp_port" bson:"smtp_port"`
SMTPFromEmailAddress string `json:"smtp_from_email_address" bson:"smtp_from_email_address"`
SMTPFromEmailPassword string `json:"smtp_from_email_password" bson:"smtp_from_email_password"`
} `json:"mail_settings,omitempty" bson:"mail_settings,omitempty"`
IMSettings struct {
Webhook string `json:"webhook" bson:"webhook"`
} `json:"im_settings,omitempty" bson:"im_settings,omitempty"`
}