mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-17 15:36:50 +00:00
Notification Test model and migrations
This commit is contained in:
parent
16bba5e817
commit
f80ea35213
File diff suppressed because one or more lines are too long
@ -219,6 +219,12 @@ exports.Prisma.NotificationProviderScalarFieldEnum = {
|
|||||||
config: 'config'
|
config: 'config'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.Prisma.NotificationTestScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
notificationProviderId: 'notificationProviderId',
|
||||||
|
success: 'success'
|
||||||
|
};
|
||||||
|
|
||||||
exports.Prisma.SortOrder = {
|
exports.Prisma.SortOrder = {
|
||||||
asc: 'asc',
|
asc: 'asc',
|
||||||
desc: 'desc'
|
desc: 'desc'
|
||||||
@ -257,7 +263,8 @@ exports.Prisma.ModelName = {
|
|||||||
ApplicationMonitoring: 'ApplicationMonitoring',
|
ApplicationMonitoring: 'ApplicationMonitoring',
|
||||||
ServerMonitoringNotification: 'ServerMonitoringNotification',
|
ServerMonitoringNotification: 'ServerMonitoringNotification',
|
||||||
ApplicationMonitoringNotification: 'ApplicationMonitoringNotification',
|
ApplicationMonitoringNotification: 'ApplicationMonitoringNotification',
|
||||||
NotificationProvider: 'NotificationProvider'
|
NotificationProvider: 'NotificationProvider',
|
||||||
|
NotificationTest: 'NotificationTest'
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
1578
prisma/generated/prisma/index.d.ts
vendored
1578
prisma/generated/prisma/index.d.ts
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "prisma-client-19bcb3aaef20e52de0ea97ea43c6350ef348393f05284ca1b48815e9775e6aa7",
|
"name": "prisma-client-2fec847da0083065385189c4f35689219e1cfa753e77e6bee4a71c77e07624c0",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"types": "index.d.ts",
|
"types": "index.d.ts",
|
||||||
"browser": "index-browser.js",
|
"browser": "index-browser.js",
|
||||||
|
|||||||
@ -139,14 +139,24 @@ model ApplicationMonitoringNotification {
|
|||||||
}
|
}
|
||||||
|
|
||||||
model NotificationProvider {
|
model NotificationProvider {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
name String
|
name String
|
||||||
type NotificationType
|
type NotificationType
|
||||||
config Json
|
config Json
|
||||||
|
tests NotificationTest[]
|
||||||
|
|
||||||
@@map("notification_providers")
|
@@map("notification_providers")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model NotificationTest {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
notificationProvider NotificationProvider @relation(fields: [notificationProviderId], references: [id], onDelete: Cascade)
|
||||||
|
notificationProviderId Int
|
||||||
|
success Boolean
|
||||||
|
|
||||||
|
@@map("notification_tests")
|
||||||
|
}
|
||||||
|
|
||||||
enum NotificationType {
|
enum NotificationType {
|
||||||
TELEGRAM
|
TELEGRAM
|
||||||
}
|
}
|
||||||
|
|||||||
@ -219,6 +219,12 @@ exports.Prisma.NotificationProviderScalarFieldEnum = {
|
|||||||
config: 'config'
|
config: 'config'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.Prisma.NotificationTestScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
notificationProviderId: 'notificationProviderId',
|
||||||
|
success: 'success'
|
||||||
|
};
|
||||||
|
|
||||||
exports.Prisma.SortOrder = {
|
exports.Prisma.SortOrder = {
|
||||||
asc: 'asc',
|
asc: 'asc',
|
||||||
desc: 'desc'
|
desc: 'desc'
|
||||||
@ -257,7 +263,8 @@ exports.Prisma.ModelName = {
|
|||||||
ApplicationMonitoring: 'ApplicationMonitoring',
|
ApplicationMonitoring: 'ApplicationMonitoring',
|
||||||
ServerMonitoringNotification: 'ServerMonitoringNotification',
|
ServerMonitoringNotification: 'ServerMonitoringNotification',
|
||||||
ApplicationMonitoringNotification: 'ApplicationMonitoringNotification',
|
ApplicationMonitoringNotification: 'ApplicationMonitoringNotification',
|
||||||
NotificationProvider: 'NotificationProvider'
|
NotificationProvider: 'NotificationProvider',
|
||||||
|
NotificationTest: 'NotificationTest'
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -0,0 +1,11 @@
|
|||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE "notification_tests" (
|
||||||
|
"id" SERIAL NOT NULL,
|
||||||
|
"notificationProviderId" INTEGER NOT NULL,
|
||||||
|
"success" BOOLEAN NOT NULL,
|
||||||
|
|
||||||
|
CONSTRAINT "notification_tests_pkey" PRIMARY KEY ("id")
|
||||||
|
);
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE "notification_tests" ADD CONSTRAINT "notification_tests_notificationProviderId_fkey" FOREIGN KEY ("notificationProviderId") REFERENCES "notification_providers"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||||
@ -145,10 +145,20 @@ model NotificationProvider {
|
|||||||
name String
|
name String
|
||||||
type NotificationType
|
type NotificationType
|
||||||
config Json
|
config Json
|
||||||
|
tests NotificationTest[]
|
||||||
|
|
||||||
@@map("notification_providers")
|
@@map("notification_providers")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model NotificationTest {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
notificationProvider NotificationProvider @relation(fields: [notificationProviderId], references: [id], onDelete: Cascade)
|
||||||
|
notificationProviderId Int
|
||||||
|
success Boolean
|
||||||
|
|
||||||
|
@@map("notification_tests")
|
||||||
|
}
|
||||||
|
|
||||||
enum NotificationType {
|
enum NotificationType {
|
||||||
TELEGRAM
|
TELEGRAM
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user