I am trying to incorporate a Type Board into one of my Prisma models. However, I am encountering an error stating that "Type 'Board' is neither a built-in type, nor refers to another model, custom type, or enum." Can someone provide guidance on how to resolve this issue?
The structure of the Board type is as follows:
export type Board = {
title: string;
boardId?: string;
id?: string;
orgId: string;
imageId: string;
imageThumbUrl: string;
imageFullUrl: string;
imageUserName: string;
imageLinkHTML: string;
createdAt?: Date;
updatedAt?: Date;
};
Within schema.prisma:
// 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 = "sqlite"
url = "file:./data/dev.db"
// url = env("DATABASE_URL")
}
model List {
id String @id @default(uuid())
title String
order Int
boardId String
board Board @relation(fields: [boardId], references: [id], onDelete: Cascade)
cards Card[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([boardId])
}