Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
🗃️ Update Prisma schema for subnets
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Oct 30, 2020
1 parent 35d97e0 commit ed452de
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ model users {
updatedAt DateTime @updatedAt
emails emails[] @relation("userEmails")
accessTokens accessTokens[] @relation("userAccessTokens")
approvedLocations approvedLocations[] @relation("userApprovedLocations")
approvedSubnets approvedSubnets[] @relation("userApprovedSubnets")
backupCodes backupCodes[] @relation("userBackupCodes")
identities identities[] @relation("userIdentities")
memberships memberships[] @relation("userMemberships")
Expand Down Expand Up @@ -139,12 +139,16 @@ model apiKeys {
updatedAt DateTime @updatedAt
}

model approvedLocations {
createdAt DateTime @default(now())
id Int @id @default(autoincrement())
subnet String
user users @relation("userApprovedLocations", fields: [userId], references: [id])
userId Int
model approvedSubnets {
createdAt DateTime @default(now())
id Int @id @default(autoincrement())
subnet String
city String?
region String?
timezone String?
countryCode String?
user users @relation("userApprovedSubnets", fields: [userId], references: [id])
userId Int
}

model backupCodes {
Expand Down

0 comments on commit ed452de

Please sign in to comment.