add manufacturer notice, format db
This commit is contained in:
parent
77dff29aa9
commit
fb340daf38
@ -2,117 +2,118 @@
|
|||||||
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
||||||
|
|
||||||
generator client {
|
generator client {
|
||||||
provider = "prisma-client-js"
|
provider = "prisma-client-js"
|
||||||
}
|
}
|
||||||
|
|
||||||
datasource db {
|
datasource db {
|
||||||
provider = "mongodb"
|
provider = "mongodb"
|
||||||
// NOTE: When using postgresql, mysql or sqlserver, uncomment the @db.Text annotations in model Account below
|
// NOTE: When using postgresql, mysql or sqlserver, uncomment the @db.Text annotations in model Account below
|
||||||
// Further reading:
|
// Further reading:
|
||||||
// https://next-auth.js.org/adapters/prisma#create-the-prisma-schema
|
// https://next-auth.js.org/adapters/prisma#create-the-prisma-schema
|
||||||
// https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#string
|
// https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#string
|
||||||
url = env("DATABASE_URL")
|
url = env("DATABASE_URL")
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Platform {
|
enum Platform {
|
||||||
APP_IOS
|
APP_IOS
|
||||||
APP_ANDROID
|
APP_ANDROID
|
||||||
WEBSITE
|
WEBSITE
|
||||||
PDF
|
PDF
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Skill {
|
enum Skill {
|
||||||
ENVIRONMENT
|
ENVIRONMENT
|
||||||
PHONEMES
|
PHONEMES
|
||||||
WORDS
|
WORDS
|
||||||
SENTENCES
|
SENTENCES
|
||||||
DISCOURSE
|
DISCOURSE
|
||||||
MUSIC
|
MUSIC
|
||||||
BACKGROUND
|
BACKGROUND
|
||||||
}
|
}
|
||||||
|
|
||||||
enum SkillLevel {
|
enum SkillLevel {
|
||||||
BEGINNER
|
BEGINNER
|
||||||
INTERMEDIATE
|
INTERMEDIATE
|
||||||
ADVANCED
|
ADVANCED
|
||||||
}
|
}
|
||||||
|
|
||||||
enum PaymentType {
|
enum PaymentType {
|
||||||
FREE
|
FREE
|
||||||
SUBSCRIPTION_WEEKLY
|
SUBSCRIPTION_WEEKLY
|
||||||
SUBSCRIPTION_MONTHLY
|
SUBSCRIPTION_MONTHLY
|
||||||
}
|
}
|
||||||
|
|
||||||
type RangeInput {
|
type RangeInput {
|
||||||
min Int
|
min Int
|
||||||
max Int
|
max Int
|
||||||
}
|
}
|
||||||
|
|
||||||
type PlatformLink {
|
type PlatformLink {
|
||||||
platform Platform
|
platform Platform
|
||||||
link String
|
link String
|
||||||
}
|
}
|
||||||
|
|
||||||
type Manufacturer {
|
type Manufacturer {
|
||||||
name String
|
name String
|
||||||
required Boolean
|
required Boolean
|
||||||
|
notice String?
|
||||||
}
|
}
|
||||||
|
|
||||||
model AuditoryResource {
|
model AuditoryResource {
|
||||||
id String @id @default(auto()) @map("_id") @db.ObjectId
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
||||||
icon String
|
icon String
|
||||||
name String
|
name String
|
||||||
description String
|
description String
|
||||||
manufacturer Manufacturer?
|
manufacturer Manufacturer?
|
||||||
ages RangeInput
|
ages RangeInput
|
||||||
skills Skill[]
|
skills Skill[]
|
||||||
skill_levels SkillLevel[]
|
skill_levels SkillLevel[]
|
||||||
payment_options PaymentType[]
|
payment_options PaymentType[]
|
||||||
platform_links PlatformLink[]
|
platform_links PlatformLink[]
|
||||||
}
|
}
|
||||||
|
|
||||||
// Necessary for Next auth
|
// Necessary for Next auth
|
||||||
model Account {
|
model Account {
|
||||||
id String @id @default(auto()) @map("_id") @db.ObjectId
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
||||||
userId String @db.ObjectId
|
userId String @db.ObjectId
|
||||||
type String
|
type String
|
||||||
provider String
|
provider String
|
||||||
providerAccountId String
|
providerAccountId String
|
||||||
refresh_token String? // @db.Text
|
refresh_token String? // @db.Text
|
||||||
access_token String? // @db.Text
|
access_token String? // @db.Text
|
||||||
expires_at Int?
|
expires_at Int?
|
||||||
token_type String?
|
token_type String?
|
||||||
scope String?
|
scope String?
|
||||||
id_token String? // @db.Text
|
id_token String? // @db.Text
|
||||||
session_state String?
|
session_state String?
|
||||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||||
|
|
||||||
@@unique([provider, providerAccountId])
|
@@unique([provider, providerAccountId])
|
||||||
}
|
}
|
||||||
|
|
||||||
model Session {
|
model Session {
|
||||||
id String @id @default(auto()) @map("_id") @db.ObjectId
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
||||||
sessionToken String @unique
|
sessionToken String @unique
|
||||||
userId String @db.ObjectId
|
userId String @db.ObjectId
|
||||||
expires DateTime
|
expires DateTime
|
||||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||||
}
|
}
|
||||||
|
|
||||||
model User {
|
model User {
|
||||||
id String @id @default(auto()) @map("_id") @db.ObjectId
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
||||||
name String?
|
name String?
|
||||||
email String? @unique
|
email String? @unique
|
||||||
emailVerified DateTime?
|
emailVerified DateTime?
|
||||||
image String?
|
image String?
|
||||||
accounts Account[]
|
accounts Account[]
|
||||||
sessions Session[]
|
sessions Session[]
|
||||||
}
|
}
|
||||||
|
|
||||||
model VerificationToken {
|
model VerificationToken {
|
||||||
id String @id @default(auto()) @map("_id") @db.ObjectId
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
||||||
identifier String
|
identifier String
|
||||||
token String @unique
|
token String @unique
|
||||||
expires DateTime
|
expires DateTime
|
||||||
|
|
||||||
@@unique([identifier, token])
|
@@unique([identifier, token])
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user