---
# System prepended metadata

title: Untitled

---

### Separat writer och user
### Separat Comment och article

```plantuml
@startuml
object writer {    
    username VARCHAR
    password VARCHAR
}

object user {    
    username VARCHAR
    password VARCHAR
}

object article {
    date DATETIME
    rubrik VARCHAR
    text TEXT
}

object Comment {    
    text VARCHAR
    date DATETIME
}

object Category {    
    text VARCHAR
}



article }o--|| Category
writer ||--o{ article
user ||--o{ Comment
article ||--o{ Comment
    
@enduml
```
---
### Combined user + writer
```plantuml
@startuml

object user {    
    username VARCHAR
    password VARCHAR
    iswriter BOOL
}

object article {
    date DATETIME
    rubrik VARCHAR
    text TEXT
}

object Comment {    
    text VARCHAR
    Datum DATETIME
}

object Category {    
    text VARCHAR
}




article }o--|| Category
user ||--o{ article
user ||--o{ Comment
article ||--o{ Comment
    
@enduml
```
---
### Combined article + Comment into Post
### Post references itself for parent comments
```plantuml
@startuml

object user {    
    username VARCHAR
    password VARCHAR
    iswriter BOOL
}

object Post {
    date DATETIME
    rubrik VARCHAR
    text TEXT
    isComment BOOL
    
}

object Category {    
    text VARCHAR
}




Post }o--|| Category
user ||--o{ Post
Post ||--o| Post
    
@enduml
```