examples/better-list-search/schema.prisma
Rama main · réplica de lectura del repositorio original.
// This file is automatically generated by Keystone, do not modify it manually.
// Modify your Keystone config when you want to change this.
datasource sqlite {
provider = "sqlite"
}
generator client {
provider = "prisma-client"
output = "./generated/prisma"
}
model Post {
id String @id @default(cuid())
title String @default("")
author Author? @relation("Post_author", fields: [authorId], references: [id])
authorId String? @map("author")
related Post[] @relation("Post_related")
tags Tag[] @relation("Post_tags")
from_Post_related Post[] @relation("Post_related")
@@index([authorId])
}
model Author {
id String @id @default(cuid())
name String @default("")
from_Post_author Post[] @relation("Post_author")
}
model Tag {
id String @id @default(cuid())
name String @default("")
posts Post[] @relation("Post_tags")
}