Skip to content

Instantly share code, notes, and snippets.

@dashameter
Last active June 11, 2020 03:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dashameter/0651bd169fb5385978854069d28435ba to your computer and use it in GitHub Desktop.
Save dashameter/0651bd169fb5385978854069d28435ba to your computer and use it in GitHub Desktop.
jembe contract [wip]
{
"jams": {
"indices": [
{
"properties": [
{
"userId": "asc"
}
]
},
{
"properties": [
{
"timestamp": "asc"
}
]
}
],
"required": [
"text",
"userId",
"timestamp"
],
"properties": {
"text": {
"type": "string"
},
"userId": {
"type": "string",
"pattern": "^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+$",
"maxLength": 44,
"minLength": 42
},
"timestamp": {
"type": "integer"
}
},
"additionalProperties": false
},
"likes": {
"indices": [
{
"properties": [
{
"jamId": "asc"
}
]
},
{
"properties": [
{
"userId": "asc"
}
]
},
{
"properties": [
{
"timestamp": "asc"
}
]
}
],
"required": [
"jamId",
"userId",
"timestamp",
"isLiked"
],
"properties": {
"jamId": {
"type": "string",
"pattern": "^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+$",
"maxLength": 44,
"minLength": 42
},
"userId": {
"type": "string",
"pattern": "^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+$",
"maxLength": 44,
"minLength": 42
},
"isLiked": {
"type": "boolean"
},
"timestamp": {
"type": "integer"
}
},
"additionalProperties": false
},
"follows": {
"indices": [
{
"properties": [
{
"jammerId": "asc"
}
]
},
{
"properties": [
{
"userId": "asc"
}
]
},
{
"properties": [
{
"timestamp": "asc"
}
]
}
],
"required": [
"userId",
"timestamp",
"jammerId",
"isFollowing"
],
"properties": {
"userId": {
"type": "string",
"pattern": "^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+$",
"maxLength": 44,
"minLength": 42
},
"jammerId": {
"type": "string",
"pattern": "^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+$",
"maxLength": 44,
"minLength": 42
},
"timestamp": {
"type": "integer"
},
"isFollowing": {
"type": "boolean"
}
},
"additionalProperties": false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment