Tottem
Bookmark manager on steroid built with React / NextJs / Apollo Tools / Prisma 2 — styled with TailwindCSS 🌱🎺
Schema
generator photon {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id String @default(cuid()) @id
authUserId String? @unique
slug String @unique
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
firstname String
pictureUrl String
biography String?
linkedin String?
github String?
mail String?
youtube String?
website String?
label String?
sections Section[]
collections Collection[]
inboxedItems Item[]
}
model Section {
id String @default(cuid()) @id
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
slug String
name String?
index Int @default(0)
collections Collection[]
owner User @relation(fields: [ownerId], references: [id])
ownerId String
isExpanded Boolean @default(true)
isDeleted Boolean @default(false)
}
model Collection {
id String @default(cuid()) @id
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
slug String @unique
name String?
isDeleted Boolean @default(false)
detail String?
items Item[]
section Section @relation(fields: [sectionId], references: [id])
sectionId String
owner User @relation(fields: [ownerId], references: [id])
ownerId String
}
model Item {
id String @default(cuid()) @id
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
isDeleted Boolean @default(false)
position Int @default(0)
title String
provider String?
author String?
type ItemType
productUrl String?
imageUrl String?
description String?
comment String?
collection Collection? @relation(fields: [collectionId], references: [id])
collectionId String?
meta String? @default("{}")
inboxOwner User? @relation(fields: [inboxOwnerId], references: [id])
inboxOwnerId String?
}
enum ItemType {
book
album
movie
video
people
article
podcast
website
repository
}