Skip to content

Commit

Permalink
Merge pull request #77 from ravindranag/new
Browse files Browse the repository at this point in the history
Added category model
  • Loading branch information
ravindranag committed Oct 9, 2022
2 parents 5cc1c51 + 3779b55 commit 6b99c0b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,21 @@ model Token {
}

model Blog {
id Int @unique @default(autoincrement())
id Int @unique @default(autoincrement())
title String
description String?
coverImageUrl String?
data Json
profileId Int
author Profile @relation(fields: [profileId], references: [id], onDelete: SetNull)
author Profile @relation(fields: [profileId], references: [id], onDelete: SetNull)
categoryId Int?
catogory Category? @relation(fields: [categoryId], references: [id], onDelete: SetNull)
}

model Category {
id Int @unique @default(autoincrement())
title String
description String?
coverImageUrl String?
blogs Blog[]
}

0 comments on commit 6b99c0b

Please sign in to comment.