# Comment

**Kind:** Database Model

**Source:** [`atloria-monorepo/apps/parser-orchestrator/test/fixtures/sample-projects/fullstack-nextjs-nestjs/backend/prisma/schema.prisma`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/parser-orchestrator/test/fixtures/sample-projects/fullstack-nextjs-nestjs/backend/prisma/schema.prisma#L72)

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

```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)
