emotion data modelling

This commit is contained in:
Ulf Gebhardt 2019-07-01 16:21:11 +02:00
parent 44205e7268
commit a264ff8eee
No known key found for this signature in database
GPG Key ID: 44C888923CC8E7F3
3 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,10 @@
type EMOTED @relation(name: "EMOTED") {
from: User
to: Post
emotion: String
#createdAt: DateTime
#updatedAt: DateTime
createdAt: String
updatedAt: String
}

View File

@ -48,4 +48,6 @@ type Post {
RETURN COUNT(u) >= 1
"""
)
emotions: [EMOTED]
}

View File

@ -77,4 +77,6 @@ type User {
badges: [Badge]! @relation(name: "REWARDED", direction: "IN")
badgesCount: Int! @cypher(statement: "MATCH (this)<-[:REWARDED]-(r:Badge) RETURN COUNT(r)")
emotions: [EMOTED]
}