Reactions content model
A reaction can be a review, a comment, a like or any type of reaction you can establish. You can create your own reaction types.
You can tailor every reaction type with its own set of fields, rules and actions.
Fields
Each reaction type consists of a set of fields that you can define.
Name | GraphQL type | Description | Limits | |
---|---|---|---|---|
Text (short) | String | Short text | 85 characters max. | |
Text (long) | String | Long text | 5,592,415 characters max. | |
Text (HTML) | String | Content with HTML tags | 5,592,415 characters max. | |
Number (integer) | Number | A whole number | from -2^9 to 2^9 | |
Number (decimal) | Number | A decimal number | from -2^35 to 2^35 | |
Date and time | DateTime | A date and time in ISO 8601 format. | ||
Boolean | Boolean | true or false | ||
Relation | Type | Another reaction type |
Relations
You can define a set of relations to other types of reactions. You can choose between one-to-one and one-to-many relations.
Example: Say you show movie reviews. These reviews can contain multiple comments and multiple likes. In this case, you have a one-to-many relation between reviews and comments, as well as between reviews and likes.
Default Fields
Every reaction includes the following default fields:
Name | GraphQL type | Description | |
---|---|---|---|
id | ID | Id of the reaction (uuid) | |
type | Enum | Type of reaction | |
language | String | language | |
status | Enum | status (awaiting moderation, accepted etc.) | |
created | DateTime | Date created | |
updated | DateTime | Date updated | |
deleted | DateTime | Date deleted |
Default Relations
Every type of reaction has a relation to a user, a target and a source as described in our domain model.
In addition to these relations, there exists a relation to the root reaction and a parent reaction.
Example: Say you show movie reviews. A review (R) has comments (C1). A user can write a comment (C2) to the comments (C1). Let's look at comment C2. The root reaction of comment C2 is review R. The parent reaction of comment C2 is comment C1.