// This is your Prisma schema file, // learn more about it in the docs: https://pris.ly/d/prisma-schema generator client { provider = "prisma-client-js" } datasource db { provider = "mysql" url = env("DATABASE_URL") } model User { id Int @id @default(autoincrement()) google_id String @unique email String @unique createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@map("user") } model Category { id Int @id @default(autoincrement()) name String @unique @db.VarChar(255) links Link[] nextCategoryId Int @default(0) createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@map("category") } model Link { id Int @id @default(autoincrement()) name String @db.VarChar(255) url String @db.Text category Category @relation(fields: [categoryId], references: [id]) categoryId Int nextLinkId Int @default(0) favorite Boolean @default(false) createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@map("link") }