Add auth
This commit is contained in:
@ -251,6 +251,7 @@ model CommissionType {
|
||||
options CommissionTypeOption[]
|
||||
extras CommissionTypeExtra[]
|
||||
customInputs CommissionTypeCustomInput[]
|
||||
requests CommissionRequest[]
|
||||
}
|
||||
|
||||
model CommissionOption {
|
||||
@ -263,7 +264,8 @@ model CommissionOption {
|
||||
|
||||
description String?
|
||||
|
||||
types CommissionTypeOption[]
|
||||
types CommissionTypeOption[]
|
||||
requests CommissionRequest[]
|
||||
}
|
||||
|
||||
model CommissionTypeOption {
|
||||
@ -295,7 +297,8 @@ model CommissionExtra {
|
||||
|
||||
description String?
|
||||
|
||||
types CommissionTypeExtra[]
|
||||
requests CommissionRequest[]
|
||||
types CommissionTypeExtra[]
|
||||
}
|
||||
|
||||
model CommissionTypeExtra {
|
||||
@ -353,6 +356,17 @@ model CommissionRequest {
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
sortIndex Int @default(0)
|
||||
|
||||
customerName String
|
||||
customerEmail String
|
||||
message String
|
||||
|
||||
optionId String?
|
||||
typeId String?
|
||||
option CommissionOption? @relation(fields: [optionId], references: [id])
|
||||
type CommissionType? @relation(fields: [typeId], references: [id])
|
||||
|
||||
extras CommissionExtra[]
|
||||
}
|
||||
|
||||
model CommissionGuidelines {
|
||||
@ -374,3 +388,66 @@ model TermsOfService {
|
||||
markdown String
|
||||
version Int @default(autoincrement())
|
||||
}
|
||||
|
||||
model User {
|
||||
id String @id
|
||||
name String
|
||||
email String
|
||||
emailVerified Boolean @default(false)
|
||||
image String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
sessions Session[]
|
||||
accounts Account[]
|
||||
|
||||
@@unique([email])
|
||||
@@map("user")
|
||||
}
|
||||
|
||||
model Session {
|
||||
id String @id
|
||||
expiresAt DateTime
|
||||
token String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
ipAddress String?
|
||||
userAgent String?
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([token])
|
||||
@@index([userId])
|
||||
@@map("session")
|
||||
}
|
||||
|
||||
model Account {
|
||||
id String @id
|
||||
accountId String
|
||||
providerId String
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
accessToken String?
|
||||
refreshToken String?
|
||||
idToken String?
|
||||
accessTokenExpiresAt DateTime?
|
||||
refreshTokenExpiresAt DateTime?
|
||||
scope String?
|
||||
password String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@index([userId])
|
||||
@@map("account")
|
||||
}
|
||||
|
||||
model Verification {
|
||||
id String @id
|
||||
identifier String
|
||||
value String
|
||||
expiresAt DateTime
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@index([identifier])
|
||||
@@map("verification")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user