replaced email with username
This commit is contained in:
+59
-12
@@ -7,22 +7,69 @@ datasource db {
|
||||
url = env("DATABASE_URL")
|
||||
}
|
||||
|
||||
model User {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
email String @unique
|
||||
password String
|
||||
collections Collection[]
|
||||
tags Tag[]
|
||||
// model Account {
|
||||
// id String @id @default(cuid())
|
||||
// userId Int
|
||||
// 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?
|
||||
|
||||
pinnedLinks Link[]
|
||||
// user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
// @@unique([provider, providerAccountId])
|
||||
// }
|
||||
|
||||
// model Session {
|
||||
// id String @id @default(cuid())
|
||||
// sessionToken String @unique
|
||||
// userId Int
|
||||
// expires DateTime
|
||||
// user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
// }
|
||||
|
||||
model User {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
|
||||
username String @unique
|
||||
|
||||
// email String? @unique
|
||||
emailVerified DateTime?
|
||||
image String?
|
||||
|
||||
// accounts Account[]
|
||||
// sessions Session[]
|
||||
|
||||
collectionsJoined UsersAndCollections[]
|
||||
isPrivate Boolean @default(false)
|
||||
whitelistedUsers String[] @default([])
|
||||
createdAt DateTime @default(now())
|
||||
password String
|
||||
collections Collection[]
|
||||
|
||||
tags Tag[]
|
||||
|
||||
pinnedLinks Link[]
|
||||
|
||||
collectionsJoined UsersAndCollections[]
|
||||
isPrivate Boolean @default(false)
|
||||
whitelistedUsers String[] @default([])
|
||||
createdAt DateTime @default(now())
|
||||
}
|
||||
|
||||
|
||||
model VerificationToken {
|
||||
identifier String
|
||||
token String @unique
|
||||
expires DateTime
|
||||
|
||||
@@unique([identifier, token])
|
||||
}
|
||||
|
||||
|
||||
model Collection {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
|
||||
Reference in New Issue
Block a user