update notification model
This commit is contained in:
1 parent
bd78dbb95d
commit
55a871cb3c
1 file changed
+15
-3
@@ -5,20 +5,32 @@ const configSchema = mongoose.Schema(
|
|||||||
webhookUrl: { type: String },
|
webhookUrl: { type: String },
|
||||||
botToken: { type: String },
|
botToken: { type: String },
|
||||||
chatId: { type: String },
|
chatId: { type: String },
|
||||||
|
platform: {
|
||||||
|
type: String,
|
||||||
|
enum: ["slack", "pager_duty"],
|
||||||
|
},
|
||||||
|
routingKey: { type: String },
|
||||||
},
|
},
|
||||||
{ _id: false }
|
{ _id: false }
|
||||||
);
|
);
|
||||||
|
|
||||||
const NotificationSchema = mongoose.Schema(
|
const NotificationSchema = mongoose.Schema(
|
||||||
{
|
{
|
||||||
monitorId: {
|
userId: {
|
||||||
type: mongoose.Schema.Types.ObjectId,
|
type: mongoose.Schema.Types.ObjectId,
|
||||||
ref: "Monitor",
|
ref: "User",
|
||||||
immutable: true,
|
immutable: true,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
teamId: {
|
||||||
|
type: mongoose.Schema.Types.ObjectId,
|
||||||
|
ref: "Team",
|
||||||
|
immutable: true,
|
||||||
|
required: true,
|
||||||
},
|
},
|
||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
enum: ["email", "sms", "webhook"],
|
enum: ["email", "sms", "webhook", "pager_duty"],
|
||||||
},
|
},
|
||||||
platform: {
|
platform: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|||||||
Reference in new issue
Block a user