Skip to content

Post

reference
1 min readUpdated

Kind: Database Model

Source: atloria-monorepo/apps/database-parser/test/fixtures/sample.prisma

Blog post model

Fields

FieldTypeRequiredKey
idStringPK
titleString
contentString-
publishedBoolean
authorIdString
createdAtDateTime
updatedAtDateTime

Diagram

mermaid
erDiagram
    Post {
        id String [PK]
        title String
        content String?
        published Boolean
        authorId String
        createdAt DateTime
        updatedAt DateTime
    }
    Post ||--|| User : "authorId"
    Post ||--}o Category : ""

Relationships

  • BELONGS_TO → User
  • HAS_MANY → Category

Referenced By

  • User (HAS_MANY)
  • Category (HAS_MANY)

Was this page helpful?

Download as PDF