Kind: Database Model
Comment on a post
Fields
| Field | Type | Required | Key |
|---|---|---|---|
id | String | ✓ | PK |
content | String | ✓ | |
postId | String | ✓ | |
authorId | String | ✓ | |
parentId | String | - | |
createdAt | DateTime | ✓ | |
updatedAt | DateTime | ✓ |
Diagram
mermaiderDiagram 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?