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