Update Prisma
This commit is contained in:
parent
c9307e4273
commit
549324851a
10312
server/package-lock.json
generated
10312
server/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -19,7 +19,7 @@
|
|||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/douglasvbarone/ifms-gql-server.git"
|
||||
"url": "git+https://github.com/douglasvbarone/ifms-portal-de-ti.git"
|
||||
},
|
||||
"keywords": [
|
||||
"ifms"
|
||||
|
@ -27,9 +27,9 @@
|
|||
"author": "Douglas Barone",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/douglasvbarone/ifms-gql-server/issues"
|
||||
"url": "https://github.com/douglasvbarone/ifms-portal-de-ti/issues"
|
||||
},
|
||||
"homepage": "https://github.com/douglasvbarone/ifms-gql-server#readme",
|
||||
"homepage": "https://github.com/douglasvbarone/ifms-portal-de-ti#readme",
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.16.0",
|
||||
"@babel/core": "^7.16.0",
|
||||
|
@ -37,10 +37,10 @@
|
|||
"@babel/plugin-proposal-object-rest-spread": "^7.16.0",
|
||||
"@babel/preset-env": "^7.16.0",
|
||||
"nodemon": "^2.0.15",
|
||||
"prisma": "^3.15.2"
|
||||
"prisma": "^4.2.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@prisma/client": "^3.15.2",
|
||||
"@prisma/client": "^4.2.1",
|
||||
"activedirectory2": "^2.1.0",
|
||||
"apollo-server": "^2.19.0",
|
||||
"apollo-server-plugin-response-cache": "^0.5.6",
|
||||
|
|
|
@ -14,12 +14,10 @@ model ResetToken {
|
|||
usedAt DateTime?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
userId Int
|
||||
user User @relation("resettoken_to_user", fields: [userId], references: [id])
|
||||
|
||||
creatorId Int
|
||||
creator User @relation("resettoken_to_creator", fields: [creatorId], references: [id])
|
||||
user User @relation("resettoken_to_user", fields: [userId], references: [id])
|
||||
}
|
||||
|
||||
model User {
|
||||
|
@ -68,13 +66,11 @@ model User {
|
|||
userPrincipalName String?
|
||||
whenChanged String?
|
||||
whenCreated String?
|
||||
|
||||
PAHost PAHost[] @relation("pahost_to_user")
|
||||
createdTokens ResetToken[] @relation("resettoken_to_creator")
|
||||
tokens ResetToken[] @relation("resettoken_to_user")
|
||||
wifiDevices WifiDevice[] @relation("wifidevice_to_user")
|
||||
ownedWifiDevices WifiDevice[] @relation("wifidevice_to_owner")
|
||||
|
||||
PAHost PAHost[] @relation("pahost_to_user")
|
||||
wifiDevices WifiDevice[] @relation("wifidevice_to_user")
|
||||
}
|
||||
|
||||
model WifiDevice {
|
||||
|
@ -84,40 +80,28 @@ model WifiDevice {
|
|||
hostname String?
|
||||
firstSeen DateTime? @default(now())
|
||||
lastSeen DateTime?
|
||||
ip String?
|
||||
name String?
|
||||
notes String?
|
||||
|
||||
essid String?
|
||||
uptime Int?
|
||||
ip String?
|
||||
apName String?
|
||||
signalStrength Int?
|
||||
frequency String?
|
||||
protocol String?
|
||||
speed Int?
|
||||
usage BigInt?
|
||||
|
||||
status Status?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
userId Int?
|
||||
controller String @default("unknown")
|
||||
|
||||
identity String? // The user informed by the controller
|
||||
|
||||
accessPointId Int?
|
||||
accessPoint AccessPoint? @relation("wifidevice_to_ap", fields: [accessPointId], references: [id], onDelete: SetNull)
|
||||
|
||||
userId Int? // The connected User
|
||||
user User? @relation("wifidevice_to_user", fields: [userId], references: [id])
|
||||
|
||||
ownerId Int? // The owner of the device
|
||||
frequency String?
|
||||
identity String?
|
||||
name String?
|
||||
notes String?
|
||||
ownerId Int?
|
||||
protocol String?
|
||||
signalStrength Int?
|
||||
speed Int?
|
||||
usage BigInt?
|
||||
uptime Int?
|
||||
accessPoint AccessPoint? @relation("wifidevice_to_ap", fields: [accessPointId], references: [id])
|
||||
owner User? @relation("wifidevice_to_owner", fields: [ownerId], references: [id])
|
||||
}
|
||||
|
||||
enum Status {
|
||||
ONLINE
|
||||
RECENT
|
||||
OFFLINE
|
||||
user User? @relation("wifidevice_to_user", fields: [userId], references: [id])
|
||||
}
|
||||
|
||||
model Log {
|
||||
|
@ -129,14 +113,6 @@ model Log {
|
|||
data Json?
|
||||
}
|
||||
|
||||
enum LogLevel {
|
||||
LOW
|
||||
INFO
|
||||
SUCCESS
|
||||
WARNING
|
||||
ERROR
|
||||
}
|
||||
|
||||
model PAHost {
|
||||
id Int @id @default(autoincrement())
|
||||
user String
|
||||
|
@ -146,7 +122,6 @@ model PAHost {
|
|||
note String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
ownerId Int
|
||||
owner User @relation("pahost_to_user", fields: [ownerId], references: [id])
|
||||
}
|
||||
|
@ -158,46 +133,35 @@ model AccessPoint {
|
|||
name String?
|
||||
local String?
|
||||
notes String?
|
||||
inventoryTag String?
|
||||
|
||||
uptime Int?
|
||||
controller String?
|
||||
model String?
|
||||
ip String?
|
||||
clients Int?
|
||||
|
||||
usage BigInt?
|
||||
|
||||
encryptedSshUser String?
|
||||
encryptedSshPassword String?
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
wifiDevices WifiDevice[] @relation("wifidevice_to_ap")
|
||||
encryptedSshPassword String?
|
||||
encryptedSshUser String?
|
||||
inventoryTag String?
|
||||
usage BigInt?
|
||||
uptime Int?
|
||||
stats AccessPointStats[] @relation("accesspointstats_to_ap")
|
||||
wifiDevices WifiDevice[] @relation("wifidevice_to_ap")
|
||||
}
|
||||
|
||||
model AccessPointStats {
|
||||
id Int @id @default(autoincrement())
|
||||
timestamp DateTime @default(now())
|
||||
|
||||
clients Int?
|
||||
|
||||
avgSignalStrength Int?
|
||||
minSignalStrength Int?
|
||||
maxSignalStrength Int?
|
||||
|
||||
avgSpeed Int?
|
||||
minSpeed Int?
|
||||
maxSpeed Int?
|
||||
|
||||
avgClientUptime Int?
|
||||
maxClientUptime Int?
|
||||
|
||||
avgUsage BigInt?
|
||||
sumUsage BigInt?
|
||||
|
||||
accessPointId Int
|
||||
accessPoint AccessPoint @relation("accesspointstats_to_ap", fields: [accessPointId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
@ -207,7 +171,20 @@ model Network {
|
|||
name String @unique
|
||||
shortName String @unique
|
||||
cidr String @unique
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
enum Status {
|
||||
ONLINE
|
||||
RECENT
|
||||
OFFLINE
|
||||
}
|
||||
|
||||
enum LogLevel {
|
||||
LOW
|
||||
INFO
|
||||
SUCCESS
|
||||
WARNING
|
||||
ERROR
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user