Skip to content

Comment

reference
1 min readUpdated

Kind: Database Model

Source: atloria-monorepo/apps/parser-orchestrator/test/fixtures/sample-projects/fullstack-nextjs-nestjs/backend/prisma/schema.prisma

Comment on a post

Fields

FieldTypeRequiredKey
idStringPK
contentString
postIdString
authorIdString
parentIdString-
createdAtDateTime
updatedAtDateTime

Diagram

mermaid
erDiagram
    Comment {
        id String [PK]
        content String
        postId String
        authorId String
        parentId String?
        createdAt DateTime
        updatedAt DateTime
    }
    Comment ||--|| Post : "postId"
    Comment ||--|| User : "authorId"
    Comment ||--|| Comment : "parentId"
    Comment ||--}o Comment : ""

Relationships

  • BELONGS_TO → Post
  • BELONGS_TO → User
  • BELONGS_TO → Comment
  • HAS_MANY → Comment

Referenced By

  • User (HAS_MANY)
  • Post (HAS_MANY)
  • Comment (BELONGS_TO)
  • Comment (HAS_MANY)

Was this page helpful?

Download as PDF