Skip to content

Instantly share code, notes, and snippets.

@saloni137
Created September 30, 2022 05:24
Show Gist options
  • Save saloni137/1e1935168b9f2f12f64664bfe42f73af to your computer and use it in GitHub Desktop.
Save saloni137/1e1935168b9f2f12f64664bfe42f73af to your computer and use it in GitHub Desktop.
Prisma Models
// 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 = env("DATABASE_URL")
}
model Category {
id Int @default(autoincrement()) @id
name String
sites Site[]
}
model Site {
id Int @default(autoincrement()) @id
title String
desc String?
image String?
date String?
content SiteContent[]
category Category? @relation(fields: [categoryId], references: [id])
categoryId Int?
}
model SiteContent {
id Int @default(autoincrement()) @id
content String?
site Site? @relation(fields: [siteId], references: [id])
siteId Int?
}
model Service {
id Int @default(autoincrement()) @id
name String?
tags String?
image String?
}
model Education {
id Int @default(autoincrement()) @id
title String?
specialization String?
startdate String?
enddate String?
description String?
}
model Experience {
id Int @default(autoincrement()) @id
role String?
title String?
specialization String?
startdate String?
enddate String?
description String?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment