Skip to content

Commit

Permalink
feat(server): add notes field to region,bundle,pay,auth (#986)
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow authored Mar 30, 2023
1 parent f559764 commit 206070a
Showing 1 changed file with 32 additions and 8 deletions.
40 changes: 32 additions & 8 deletions server/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ datasource db {
url = env("DATABASE_URL")
}

enum NoteLevel {
Info
Warning
Danger
Error
}

type Note {
title String?
content String?
link String?
level NoteLevel @default(Info)
}

// user schemas

model User {
Expand Down Expand Up @@ -104,6 +118,8 @@ model Region {
tls Boolean @default(false)
state String @default("Active") // Active, Inactive
notes Note[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
Expand Down Expand Up @@ -152,6 +168,10 @@ model Bundle {
maxRenewalTime Int // in seconds
resource BundleResource
notes Note[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
region Region @relation(fields: [regionId], references: [id])
Expand Down Expand Up @@ -305,6 +325,7 @@ model PaymentChannel {
name String
spec Json
state String @default("Active") // Active, Inactive
notes Note[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
Expand Down Expand Up @@ -584,9 +605,9 @@ model BucketDomain {
domain String @unique
state DomainState @default(Active)
phase DomainPhase @default(Creating)
lockedAt DateTime
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
lockedAt DateTime
bucket StorageBucket @relation(fields: [bucketName], references: [name])
}
Expand All @@ -612,13 +633,16 @@ enum AuthProviderState {
}

model AuthProvider {
id String @id @default(auto()) @map("_id") @db.ObjectId
name String @unique
bind Json
register Boolean
default Boolean
state AuthProviderState
config Json
id String @id @default(auto()) @map("_id") @db.ObjectId
name String @unique
bind Json
register Boolean
default Boolean
state AuthProviderState
config Json
notes Note[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}

// Sms schemas
Expand Down

0 comments on commit 206070a

Please sign in to comment.