diff --git a/README.md b/README.md index 728652f..f95a905 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,17 @@
Repository holding the data model specified as json document, json schema and with its html and pdf documentation. +Release Notes: + +- [v1- Outdated](/v1) - First Data Model, used in the hackathon app +- [v2 - Outdated](/v2) - Total rework of the data model into more organized and concise version. +- [v3 - Current](/v3) - Added support for private messages -The data model is versioned, with the current live version being [v1](/v1) and with [v2](/v2) being produced.
The HTML documentation is hosted at Github Pages at the following URL: https://fightpandemics.github.io/DataModel/ -## Diagram for the Data Model v2 +## Diagram for the Data Model v3

@@ -24,9 +28,9 @@ The HTML documentation is hosted at Github Pages at the following URL: https://f # Documentation -The documentation can be found in [HTML](https://fightpandemics.github.io/DataModel/) and [PDF](v2/docs/FightPandemics_documentation.pdf). The HTML live version is highly recommended. +The documentation can be found in [HTML](https://fightpandemics.github.io/DataModel/) and [PDF](v3/docs/FightPandemics_documentation.pdf). The HTML live version is highly recommended. -There is also an [excel spreadsheet version](v2/docs/FightPandemics.xlsx). +There is also an [excel spreadsheet version](v3/docs/FightPandemics.xlsx).
@@ -39,9 +43,9 @@ There is also an [excel spreadsheet version](v2/docs/FightPandemics.xlsx). # Specifications and Scripts -There are [JSON Document](v2/scripts/JSON_Document) and [JSON Schema](v2/scripts/JSON_Schema) representations. +There are [JSON Document](v3/scripts/JSON_Document) and [JSON Schema](v3/scripts/JSON_Schema) representations. -There are [MongoDB Scripts](v2/scripts/MongoDB_Script) available for collection creation, in JS with standard Mongo Shell flavor. +There are [MongoDB Scripts](v3/scripts/MongoDB_Script) available for collection creation, in JS with standard Mongo Shell flavor. Mongoose scripts are in the roadmap for the near future. @@ -98,3 +102,30 @@ For more detailed information, please visit the [documentation](https://fightpan


+ + +## Threads + +Document that represents a conversation between users. The participants array was used to allow expansion for group chats in the future, while the status field is to be used for blocking or archiving conversations. + +For more detailed information, please visit the [documentation](https://fightpandemics.github.io/DataModel/). + +
+

+ +

+
+ + +## Messages + +Document that represents a mnessage sent by a user in a Message Thread. +The status field was thougth to be used in the future to allow flagging a message as edited or deleted. It is possible, but optional, to associate a post with the message, to be used as a "quotation" or "embedding" of the post when someone wants to talk about it. + +For more detailed information, please visit the [documentation](https://fightpandemics.github.io/DataModel/). + +
+

+ +

+
\ No newline at end of file diff --git a/images/comments_collection.png b/images/comments_collection.png index e38cd4b..77ddd33 100644 Binary files a/images/comments_collection.png and b/images/comments_collection.png differ diff --git a/images/diagram_model.png b/images/diagram_model.png index 938403a..dd0fc26 100644 Binary files a/images/diagram_model.png and b/images/diagram_model.png differ diff --git a/images/feedbacks_collection.png b/images/feedbacks_collection.png index de325fd..a70c192 100644 Binary files a/images/feedbacks_collection.png and b/images/feedbacks_collection.png differ diff --git a/images/messages_collection.png b/images/messages_collection.png new file mode 100644 index 0000000..3a1270e Binary files /dev/null and b/images/messages_collection.png differ diff --git a/images/posts_collection.png b/images/posts_collection.png index 0125ba8..9d7d07c 100644 Binary files a/images/posts_collection.png and b/images/posts_collection.png differ diff --git a/images/threads_collection.png b/images/threads_collection.png new file mode 100644 index 0000000..417a822 Binary files /dev/null and b/images/threads_collection.png differ diff --git a/images/users_collection.png b/images/users_collection.png index e00a744..00131ab 100644 Binary files a/images/users_collection.png and b/images/users_collection.png differ diff --git a/index.html b/index.html index 2ad4274..14eed54 100644 --- a/index.html +++ b/index.html @@ -1,25 +1,16 @@ - - Fight Pandemics - Data Model - - - - - - - - - - + + Hackolade - - - +/*# sourceURL=ace/css/ace_searchbox */ -
✕

MongoDB Physical Model

Schema for:

Model name: FightPandemics
Author: Nícolas de Araujo
Version: 2
File name: data_model.json
File path: C:\Users\nicol\Dev\fight_pandemics\DataModel\v2\data_model.json
Printed On: Fri May 01 2020 13:38:40 GMT-0300 (Horário Padrão de Brasília)
Created with: Hackolade - Visual data modeling for NoSQL and multimodel databases
1. Model
1.1 Model FightPandemics
1.1.1 FightPandemics Entity Relationship Diagram
Databases
applicationDB
1.1.2 FightPandemics Properties
PropertyValue
Model nameFightPandemics
Technical nameFightPandemics
Description
AuthorNícolas de Araujo
Version2
DB vendorMongoDB
DB versionv4.2
Comments
1.1.3 FightPandemics DB Definitions
1.1.3.1 Field location
1.1.3.1.1 location Tree Diagram
{...}
location
[...]
coordinates
{ABC}
type
{ABC}
country
{ABC}
city
{ABC}
neighborhood
{ABC}
address
{...}
location
[...]
coordinates
{ABC}
type
{ABC}
country
{ABC}
city
{ABC}
neighborhood
{ABC}
address
1.1.3.1.2 location Hierarchy
Parent field:
Child field(s):
FieldTypeReqKeyDescriptionComments
coordinatesarraytrue

Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

-
typestringtrue

Type of the GeoJSON Object. +

✕

MongoDB Physical Model

Schema for:

Model name: FightPandemics
Author: Nícolas de Araujo
Version: 3
File name: data_model.json
File path: U:\home\naraujo\Dev\FightPandemics\DataModel\v3\data_model.json
Printed On: Mon Sep 07 2020 22:12:49 GMT-0300 (Horário Padrão de Brasília)
Created with: Hackolade - Visual data modeling for NoSQL and multimodel databases
1. Model
1.1 Model FightPandemics
1.1.1 FightPandemics Entity Relationship Diagram
1.1.2 FightPandemics Properties
PropertyValue
Model nameFightPandemics
Technical nameFightPandemics
Description
AuthorNícolas de Araujo
Version3
DB vendorMongoDB
DB versionv4.2
Comments
1.1.3 FightPandemics DB Definitions
1.1.3.1 Field location
1.1.3.1.1 location Tree Diagram
1.1.3.1.2 location Hierarchy
Parent field: Definitions
Child field(s):
FieldTypeReqKeyDescriptionComments
coordinatesarraytrue

Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

+
typestringtrue

Type of the GeoJSON Object. Please refer to the official documentation for more information.

In our case, the value will always be of the type "Point".

-
countrystringfalse

String holding the country's name.

-
citystringfalse

String holding the city's name.

-
neighborhoodstringfalse

String holding the neighborhood's name.

-
addressstringfalse

String holding the address (street, number and other details).

+
countrystringfalse

String holding the country's name.

+
citystringfalse

String holding the city's name.

+
neighborhoodstringfalse

String holding the neighborhood's name.

+
addressstringfalse

String holding the address (street, number and other details).

1.1.3.1.3 location properties
PropertyValue
Name location
Technical name
Id
Type document
Description

Location document according to the norms of a GeoJSON Object. The fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.

-
Dependencies
Required false
Primary key false
Foreign collection
Foreign field
Relationship type
DBRef
Min Properties
Max Properties
Additional properties false
Comments
1.1.3.2 Field coordinates
1.1.3.2.1 coordinates Tree Diagram
[...]
coordinates
{123}
[0]
{123}
[1]+
[...]
coordinates
{123}
[0]
{123}
[1]+
1.1.3.2.2 coordinates Hierarchy
Parent field: location
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]numericfalse

Location longitude

-
[1]numericfalse

Location latitude

+
Dependencies
Required false
Primary key false
Foreign collection
Foreign field
Relationship type
DBRef
Min Properties
Max Properties
Additional properties false
Comments
1.1.3.2 Field coordinates
1.1.3.2.1 coordinates Tree Diagram
1.1.3.2.2 coordinates Hierarchy
Parent field: location
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]numericfalse

Location longitude

+
[1]numericfalse

Location latitude

1.1.3.2.3 coordinates properties
PropertyValue
Name coordinates
Technical name
Id
Type array
Description

Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

-
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Min items 2
Max items 2
Unique items false
Additional items true
Comments
1.1.3.3 Field [0]
1.1.3.3.1 [0] Tree Diagram
{123}
[0]
{123}
[0]
1.1.3.3.2 [0] properties
PropertyValue
Id lng
Type numeric
Subtype
Description

Location longitude

-
Dependencies
Primary key false
Foreign collection
Foreign field
Relationship type
Default 0
Unit degrees
Min value -180
Excl min false
Max value 180
Excl max false
Multiple of
Divisible by
Enum
Sample 35.26
Comments
1.1.3.4 Field [1]
1.1.3.4.1 [1] Tree Diagram
{123}
[1]
{123}
[1]
1.1.3.4.2 [1] properties
PropertyValue
Id lat
Type numeric
Subtype
Description

Location latitude

-
Dependencies
Primary key false
Foreign collection
Foreign field
Relationship type
Default 0
Unit degrees
Min value -90
Excl min false
Max value 90
Excl max false
Multiple of
Divisible by
Enum
Sample -32.83
Comments
1.1.3.5 Field type
1.1.3.5.1 type Tree Diagram
{ABC}
type
{ABC}
type
1.1.3.5.2 type properties
PropertyValue
Name type
Technical name
Id
Type string
Description

Type of the GeoJSON Object. +

Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Min items 2
Max items 2
Unique items false
Additional items true
Comments
1.1.3.3 Field [0]
1.1.3.3.1 [0] Tree Diagram
1.1.3.3.2 [0] properties
PropertyValue
Display name
Id lng
Type numeric
Subtype
Description

Location longitude

+
Dependencies
Primary key false
Foreign collection
Foreign field
Relationship type
Default 0
Unit degrees
Min value -180
Excl min false
Max value 180
Excl max false
Multiple of
Divisible by
Enum
Sample 35.26
Comments
1.1.3.4 Field [1]
1.1.3.4.1 [1] Tree Diagram
1.1.3.4.2 [1] properties
PropertyValue
Display name
Id lat
Type numeric
Subtype
Description

Location latitude

+
Dependencies
Primary key false
Foreign collection
Foreign field
Relationship type
Default 0
Unit degrees
Min value -90
Excl min false
Max value 90
Excl max false
Multiple of
Divisible by
Enum
Sample -32.83
Comments
1.1.3.5 Field type
1.1.3.5.1 type Tree Diagram
1.1.3.5.2 type properties
PropertyValue
Name type
Technical name
Id
Type string
Description

Type of the GeoJSON Object. Please refer to the official documentation for more information.

In our case, the value will always be of the type "Point".

-
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Min length
Max length
Pattern
Format
Enum Point
Sample
Comments
1.1.3.6 Field country
1.1.3.6.1 country Tree Diagram
{ABC}
country
{ABC}
country
1.1.3.6.2 country properties
PropertyValue
Name country
Technical name
Id
Type string
Description

String holding the country's name.

-
Dependencies
Required false
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Min length
Max length
Pattern
Format
Enum
Sample
Comments
1.1.3.7 Field city
1.1.3.7.1 city Tree Diagram
{ABC}
city
{ABC}
city
1.1.3.7.2 city properties
PropertyValue
Name city
Technical name
Id
Type string
Description

String holding the city's name.

-
Dependencies
Required false
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Min length
Max length
Pattern
Format
Enum
Sample
Comments
1.1.3.8 Field neighborhood
1.1.3.8.1 neighborhood Tree Diagram
{ABC}
neighborhood
{ABC}
neighborhood
1.1.3.8.2 neighborhood properties
PropertyValue
Name neighborhood
Technical name
Id
Type string
Description

String holding the neighborhood's name.

-
Dependencies
Required false
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Min length
Max length
Pattern
Format
Enum
Sample
Comments
1.1.3.9 Field address
1.1.3.9.1 address Tree Diagram
{ABC}
address
{ABC}
address
1.1.3.9.2 address properties
PropertyValue
Name address
Technical name
Id
Type string
Description

String holding the address (street, number and other details).

-
Dependencies
Required false
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Min length
Max length
Pattern
Format
Enum
Sample
Comments
1.1.3.10 Field author
1.1.3.10.1 author Tree Diagram
{...}
author
{_id}
id
{ABC}
name
{ABC}
type
location
ref:
location (m)
{...}
author
{_id}
id
{ABC}
name
{ABC}
type
location
ref:
location (m)
1.1.3.10.2 author Hierarchy
Parent field:
Child field(s):
FieldTypeReqKeyDescriptionComments
idobjectIdtruefk

Foreign key to the user who created the post.

-
namestringtrue
typestringtrue
locationreferencetrue
1.1.3.10.3 author properties
PropertyValue
Name author
Technical name
Id
Type document
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
DBRef
Min Properties
Max Properties
Additional properties false
Comments
1.1.3.11 Field id
1.1.3.11.1 id Tree Diagram
{_id}
id
{_id}
id
1.1.3.11.2 id properties
PropertyValue
Name id
Technical name
Id
Type objectId
Description

Foreign key to the user who created the post.

-
Dependencies
Required true
Primary key false
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Default
Sample
Comments
1.1.3.12 Field name
1.1.3.12.1 name Tree Diagram
{ABC}
name
{ABC}
name
1.1.3.12.2 name properties
PropertyValue
Name name
Technical name
Id
Type string
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Min length
Max length
Pattern
Format
Enum
Sample
Comments
1.1.3.13 Field type
1.1.3.13.1 type Tree Diagram
{ABC}
type
{ABC}
type
1.1.3.13.2 type properties
PropertyValue
Name type
Technical name
Id
Type string
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Min length
Max length
Pattern
Format
Enum
Sample
Comments
1.1.3.14 Field location
1.1.3.14.1 location Tree Diagram
location
ref:
location (m)
location
ref:
location (m)
1.1.3.14.2 location properties
PropertyValue
Name location
$ref#model/definitions/location
Reference type model
2. Databases
2.1 Database applicationDB
Databases
applicationDB
2.1.1 applicationDB Properties
PropertyValue
Database nameapplicationDB
Technical name
Enable sharding
Description
Comments
2.1.2 applicationDB Collections
2.1.2.1 Collection comments
2.1.2.1.1 comments Tree Diagram
comments
{_id}
_id
{dt}
createdAt
(I1.1)
{dt}
updatedAt
author
ref:
author (m)
{_id}
postId
(I1.3)
{_id}
parentId
(I1.2)
{ABC}
content
[...]
likes
{_id}
id
{ABC}
name
{ABC}
type
location
ref:
location (m)
{_id}
[0]*
[...]
coordinates
{ABC}
type
{ABC}
country
{ABC}
city
{ABC}
neighborhood
{ABC}
address
{123}
[0]
{123}
[1]+
comments
{_id}
_id
{dt}
createdAt
(I1.1)
{dt}
updatedAt
author
ref:
author (m)
{_id}
postId
(I1.3)
{_id}
parentId
(I1.2)
{ABC}
content
[...]
likes
{_id}
id
{ABC}
name
{ABC}
type
location
ref:
location (m)
{_id}
[0]*
[...]
coordinates
{ABC}
type
{ABC}
country
{ABC}
city
{ABC}
neighborhood
{ABC}
address
{123}
[0]
{123}
[1]+
2.1.2.1.2 comments Properties
PropertyValue
Collection namecomments
Technical name
Id
Description
DatabaseapplicationDB
Cappedfalse
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Additional propertiesfalse
Comments
2.1.2.1.3 comments Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdtrue

Automatically generated object_id as primary key.

-
createdAtdatetrue

Timestamp with the comment's creation date

-
updatedAtdatetrue

Timestamp with the comment's last update date

-
authordocumenttrue
idobjectIdtrue

Foreign key to the user who created the post.

-
namestringtrue
typestringtrue
locationdocumenttrue

Location document according to the norms of a GeoJSON Object. +

Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Min length
Max length
Pattern
Format
Enum Point
Sample
Comments
1.1.3.6 Field country
1.1.3.6.1 country Tree Diagram
1.1.3.6.2 country properties
PropertyValue
Name country
Technical name
Id
Type string
Description

String holding the country's name.

+
Dependencies
Required false
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Min length
Max length
Pattern
Format
Enum
Sample
Comments
1.1.3.7 Field city
1.1.3.7.1 city Tree Diagram
1.1.3.7.2 city properties
PropertyValue
Name city
Technical name
Id
Type string
Description

String holding the city's name.

+
Dependencies
Required false
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Min length
Max length
Pattern
Format
Enum
Sample
Comments
1.1.3.8 Field neighborhood
1.1.3.8.1 neighborhood Tree Diagram
1.1.3.8.2 neighborhood properties
PropertyValue
Name neighborhood
Technical name
Id
Type string
Description

String holding the neighborhood's name.

+
Dependencies
Required false
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Min length
Max length
Pattern
Format
Enum
Sample
Comments
1.1.3.9 Field address
1.1.3.9.1 address Tree Diagram
1.1.3.9.2 address properties
PropertyValue
Name address
Technical name
Id
Type string
Description

String holding the address (street, number and other details).

+
Dependencies
Required false
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Min length
Max length
Pattern
Format
Enum
Sample
Comments
1.1.3.10 Field author
1.1.3.10.1 author Tree Diagram
1.1.3.10.2 author Hierarchy
Parent field: Definitions
Child field(s):
FieldTypeReqKeyDescriptionComments
idobjectIdtruefk

Foreign key to the user who created the post.

+
namestringtrue
typestringtrue
locationreferencetrue
1.1.3.10.3 author properties
PropertyValue
Name author
Technical name
Id
Type document
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
DBRef
Min Properties
Max Properties
Additional properties false
Comments
1.1.3.11 Field id
1.1.3.11.1 id Tree Diagram
1.1.3.11.2 id properties
PropertyValue
Name id
Technical name
Id
Type objectId
Description

Foreign key to the user who created the post.

+
Dependencies
Required true
Primary key false
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Default
Sample
Comments
1.1.3.12 Field name
1.1.3.12.1 name Tree Diagram
1.1.3.12.2 name properties
PropertyValue
Name name
Technical name
Id
Type string
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Min length
Max length
Pattern
Format
Enum
Sample
Comments
1.1.3.13 Field type
1.1.3.13.1 type Tree Diagram
1.1.3.13.2 type properties
PropertyValue
Name type
Technical name
Id
Type string
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Min length
Max length
Pattern
Format
Enum
Sample
Comments
1.1.3.14 Field location
1.1.3.14.1 location Tree Diagram
1.1.3.14.2 location properties
PropertyValue
Name location
Technical name
$ref#model/definitions/location
Reference type model
Reference description
1.1.3.15 Field postRef
1.1.3.15.1 postRef Tree Diagram
1.1.3.15.2 postRef Hierarchy
Parent field: Definitions
Child field(s):
FieldTypeReqKeyDescriptionComments
idobjectIdtrue
objectivestringtrue

Field to indicate the post's objective. +Currently only two values allowed: "offering help" and "looking for help".

+
titlestringtrue

The post title.

+
contentstringtrue

String for the post content.

+
authorreferencetrue
1.1.3.15.3 postRef properties
PropertyValue
Name postRef
Technical name
Id
Type document
Description

Optional post reference, allowing a post to be referenced in a message thread.

+
Dependencies
Required false
Primary key false
Foreign collection
Foreign field
Relationship type
DBRef
Min Properties
Max Properties
Additional properties false
Comments
1.1.3.16 Field id
1.1.3.16.1 id Tree Diagram
1.1.3.16.2 id properties
PropertyValue
Name id
Technical name
Id
Type objectId
Description
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Sample
Comments
1.1.3.17 Field objective
1.1.3.17.1 objective Tree Diagram
1.1.3.17.2 objective properties
PropertyValue
Name objective
Technical name
Id
Type string
Description

Field to indicate the post's objective. +Currently only two values allowed: "offering help" and "looking for help".

+
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Min length
Max length
Pattern
Format
Enum request,offer
Sample offer
Comments
1.1.3.18 Field title
1.1.3.18.1 title Tree Diagram
1.1.3.18.2 title properties
PropertyValue
Name title
Technical name
Id
Type string
Description

The post title.

+
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Min length
Max length
Pattern
Format
Enum
Sample
Comments
1.1.3.19 Field content
1.1.3.19.1 content Tree Diagram
1.1.3.19.2 content properties
PropertyValue
Name content
Technical name
Id
Type string
Description

String for the post content.

+
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Min length
Max length
Pattern
Format
Enum
Sample
Comments
1.1.3.20 Field author
1.1.3.20.1 author Tree Diagram
1.1.3.20.2 author properties
PropertyValue
Name author
Technical name
$ref#model/definitions/author
Reference type model
Reference description
2. Databases
2.1 Database applicationDB
2.1.1 applicationDB Properties
PropertyValue
Database nameapplicationDB
Technical name
Enable sharding
Description
Comments
2.1.2 applicationDB Collections
2.1.2.1 Collection comments
2.1.2.1.1 comments Tree Diagram
2.1.2.1.2 comments Properties
PropertyValue
Collection namecomments
Technical name
Id
Description
DatabaseapplicationDB
Cappedfalse
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Additional propertiesfalse
Comments
2.1.2.1.3 comments Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdtrue

Automatically generated object_id as primary key.

+
createdAtdatetrue

Timestamp with the comment's creation date

+
updatedAtdatetrue

Timestamp with the comment's last update date

+
authordocumenttrue
idobjectIdtrue

Foreign key to the user who created the post.

+
namestringtrue
typestringtrue
locationdocumenttrue

Location document according to the norms of a GeoJSON Object. The fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.

-
coordinatesarraytrue

Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

-
[0]numericfalse

Location longitude

-
[1]numericfalse

Location latitude

-
typestringtrue

Type of the GeoJSON Object. +

coordinatesarraytrue

Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

+
[0]numericfalse

Location longitude

+
[1]numericfalse

Location latitude

+
typestringtrue

Type of the GeoJSON Object. Please refer to the official documentation for more information.

In our case, the value will always be of the type "Point".

-
countrystringfalse

String holding the country's name.

-
citystringfalse

String holding the city's name.

-
neighborhoodstringfalse

String holding the neighborhood's name.

-
addressstringfalse

String holding the address (street, number and other details).

-
postIdobjectIdtrue
parentIdobjectIdfalse

If the comment is nested (in another comment), this field will hold the _id of the parent comment. Optional field, where being blank means it is a root comment.

-
contentstringtrue

Stirng holding the comment's content.

-
likesarrayfalse

Array holding the user_id of all the users who liked the comment.

-
[0]objectIdfalse

_id of the user who liked the comment

-
2.1.2.1.3.1 Field _id
2.1.2.1.3.1.1 _id Tree Diagram
{_id}
_id
{_id}
_id
2.1.2.1.3.1.2 _id properties
PropertyValue
Name _id
Technical name
Id
Type objectId
Description

Automatically generated object_id as primary key.

-
Dependencies
Required true
Primary key true
Foreign collection
Foreign field
Relationship type
Default
Sample
Comments
2.1.2.1.3.2 Field createdAt
2.1.2.1.3.2.1 createdAt Tree Diagram
{dt}
createdAt
(I1.1)
{dt}
createdAt
(I1.1)
2.1.2.1.3.2.2 createdAt properties
PropertyValue
Name createdAt
Technical name
Id
Type date
Description

Timestamp with the comment's creation date

-
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Sample
Comments
2.1.2.1.3.3 Field updatedAt
2.1.2.1.3.3.1 updatedAt Tree Diagram
{dt}
updatedAt
{dt}
updatedAt
2.1.2.1.3.3.2 updatedAt properties
PropertyValue
Name updatedAt
Technical name
Id
Type date
Description

Timestamp with the comment's last update date

-
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Sample
Comments
2.1.2.1.3.4 Field author
2.1.2.1.3.4.1 author Tree Diagram
author
ref:
author (m)
author
ref:
author (m)
2.1.2.1.3.4.2 author properties
PropertyValue
Name author
$ref#model/definitions/author
Reference type model
2.1.2.1.3.5 Field postId
2.1.2.1.3.5.1 postId Tree Diagram
{_id}
postId
(I1.3)
{_id}
postId
(I1.3)
2.1.2.1.3.5.2 postId properties
PropertyValue
Name postId
Technical name
Id
Type objectId
Description
Dependencies
Required true
Primary key false
Foreign collection posts
Foreign field
Relationship type
Default
Sample
Comments
2.1.2.1.3.6 Field parentId
2.1.2.1.3.6.1 parentId Tree Diagram
{_id}
parentId
(I1.2)
{_id}
parentId
(I1.2)
2.1.2.1.3.6.2 parentId properties
PropertyValue
Name parentId
Technical name
Id
Type objectId
Description

If the comment is nested (in another comment), this field will hold the _id of the parent comment. Optional field, where being blank means it is a root comment.

-
Dependencies
Required false
Primary key false
Foreign collection comments
Foreign field _id
Relationship type Foreign Key
Default
Sample
Comments
2.1.2.1.3.7 Field content
2.1.2.1.3.7.1 content Tree Diagram
{ABC}
content
{ABC}
content
2.1.2.1.3.7.2 content properties
PropertyValue
Name content
Technical name
Id
Type string
Description

Stirng holding the comment's content.

-
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Min length
Max length
Pattern
Format
Enum
Sample
Comments
2.1.2.1.3.8 Field likes
2.1.2.1.3.8.1 likes Tree Diagram
[...]
likes
{_id}
[0]*
[...]
likes
{_id}
[0]*
2.1.2.1.3.8.2 likes Hierarchy
Parent field: author
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]objectIdfalsefk

_id of the user who liked the comment

+
countrystringfalse

String holding the country's name.

+
citystringfalse

String holding the city's name.

+
neighborhoodstringfalse

String holding the neighborhood's name.

+
addressstringfalse

String holding the address (street, number and other details).

+
postIdobjectIdtrue
parentIdobjectIdfalse

If the comment is nested (in another comment), this field will hold the _id of the parent comment. Optional field, where being blank means it is a root comment.

+
contentstringtrue

Stirng holding the comment's content.

+
likesarrayfalse

Array holding the user_id of all the users who liked the comment.

+
[0]objectIdfalse

_id of the user who liked the comment

+
2.1.2.1.3.1 Field _id
2.1.2.1.3.1.1 _id Tree Diagram
2.1.2.1.3.1.2 _id properties
PropertyValue
Name _id
Technical name
Id
Type objectId
Description

Automatically generated object_id as primary key.

+
Dependencies
Required true
Primary key true
Foreign collection
Foreign field
Relationship type
Default
Sample
Comments
2.1.2.1.3.2 Field createdAt
2.1.2.1.3.2.1 createdAt Tree Diagram
2.1.2.1.3.2.2 createdAt properties
PropertyValue
Name createdAt
Technical name
Id
Type date
Description

Timestamp with the comment's creation date

+
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Sample
Comments
2.1.2.1.3.3 Field updatedAt
2.1.2.1.3.3.1 updatedAt Tree Diagram
2.1.2.1.3.3.2 updatedAt properties
PropertyValue
Name updatedAt
Technical name
Id
Type date
Description

Timestamp with the comment's last update date

+
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Sample
Comments
2.1.2.1.3.4 Field author
2.1.2.1.3.4.1 author Tree Diagram
2.1.2.1.3.4.2 author properties
PropertyValue
Name author
Technical name
$ref#model/definitions/author
Reference type model
Reference description
2.1.2.1.3.5 Field postId
2.1.2.1.3.5.1 postId Tree Diagram
2.1.2.1.3.5.2 postId properties
PropertyValue
Name postId
Technical name
Id
Type objectId
Description
Dependencies
Required true
Primary key false
Foreign collection posts
Foreign field
Relationship type
Default
Sample
Comments
2.1.2.1.3.6 Field parentId
2.1.2.1.3.6.1 parentId Tree Diagram
2.1.2.1.3.6.2 parentId properties
PropertyValue
Name parentId
Technical name
Id
Type objectId
Description

If the comment is nested (in another comment), this field will hold the _id of the parent comment. Optional field, where being blank means it is a root comment.

+
Dependencies
Required false
Primary key false
Foreign collection comments
Foreign field _id
Relationship type Foreign Key
Default
Sample
Comments
2.1.2.1.3.7 Field content
2.1.2.1.3.7.1 content Tree Diagram
2.1.2.1.3.7.2 content properties
PropertyValue
Name content
Technical name
Id
Type string
Description

Stirng holding the comment's content.

+
Dependencies
Required true
Primary key false
Foreign collection
Foreign field
Relationship type
Default
Min length
Max length
Pattern
Format
Enum
Sample
Comments
2.1.2.1.3.8 Field likes
2.1.2.1.3.8.1 likes Tree Diagram
2.1.2.1.3.8.2 likes Hierarchy
Parent field: comments
Child field(s):
FieldTypeReqKeyDescriptionComments
[0]objectIdfalsefk

_id of the user who liked the comment

2.1.2.1.3.8.3 likes properties
PropertyValue
Name likes
Technical name
Id
Type array
Description

Array holding the user_id of all the users who liked the comment.

-
Dependencies
Required false
Primary key false
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Min items
Max items
Unique items true
Additional items true
Comments
2.1.2.1.3.9 Field coordinates
2.1.2.1.3.9.1 coordinates Tree Diagram
{_id}
coordinates
{_id}
coordinates
2.1.2.1.3.9.2 coordinates properties
PropertyValue
Id
Type objectId
Description

_id of the user who liked the comment

+
Dependencies
Required false
Primary key false
Foreign collection users
Foreign field _id
Relationship type Foreign Key
Min items
Max items
Unique items true
Additional items true
Comments
2.1.2.1.3.9 Field [0]
2.1.2.1.3.9.1 [0] Tree Diagram
2.1.2.1.3.9.2 [0] properties
PropertyValue
Display name
Id
Type objectId
Description

_id of the user who liked the comment

Dependencies
Primary key false
Foreign collection
Foreign field
Relationship type Foreign Key
Default
Sample
Comments
2.1.2.1.4 comments Indexes
Property New Index
Name New Index
Key createdAt('ascending'), parentId('ascending'), postId('ascending')
Hashed
Unique
Drop duplicates
Sparse
Background indexing
Partial filter exp
Expire after (seconds)
Storage engine WiredTiger
Comments
2.1.2.1.5 comments JSON Schema
{
     "$schema": "http://json-schema.org/draft-04/schema#",
     "type": "object",
@@ -324,29 +324,29 @@
 {
     "name": "New Index"
 }
-);
2.1.2.2 Collection feedbacks
2.1.2.2.1 feedbacks Tree Diagram
feedbacks
{_id}
_id
{dt}
createdAt
{dt}
updatedAt
{123}
rating
{ABC}
ipAddress
{123}
age
{ABC}
mostValuableFeature
{ABC}
whatWouldChange
{ABC}
generalFeedback
{ABC}
covidImpact
{_id}
userId
location
ref:
location (m)
[...]
coordinates
{ABC}
type
{ABC}
country
{ABC}
city
{ABC}
neighborhood
{ABC}
address
{123}
[0]
{123}
[1]+
feedbacks
{_id}
_id
{dt}
createdAt
{dt}
updatedAt
{123}
rating
{ABC}
ipAddress
{123}
age
{ABC}
mostValuableFeature
{ABC}
whatWouldChange
{ABC}
generalFeedback
{ABC}
covidImpact
{_id}
userId
location
ref:
location (m)
[...]
coordinates
{ABC}
type
{ABC}
country
{ABC}
city
{ABC}
neighborhood
{ABC}
address
{123}
[0]
{123}
[1]+
2.1.2.2.2 feedbacks Properties
PropertyValue
Collection namefeedbacks
Technical name
Id
Description

Collection to hold feedback on the application.

+);
2.1.2.2 Collection feedbacks
2.1.2.2.1 feedbacks Tree Diagram
2.1.2.2.2 feedbacks Properties
PropertyValue
Collection namefeedbacks
Technical name
Id
Description

Collection to hold feedback on the application.

This may be done with the user logged or not and, depending on that, we may or may not have a reference to the user in question at this model.

-
DatabaseapplicationDB
Cappedfalse
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Additional propertiesfalse
Comments
2.1.2.2.3 feedbacks Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdtrue

Automatically generated object_id as primary key.

-
createdAtdatetrue

Timestamp with the feedback's creation date

-
updatedAtdatetrue

Timestamp with the feedback's last update date

-
ratingnumerictrue

A rating, in a scale of 1 to 5, of the application.

+
DatabaseapplicationDB
Cappedfalse
Size
Max
Storage engineWiredTiger
Config String
Validation levelOff
Validation actionWarn
Additional propertiesfalse
Comments
2.1.2.2.3 feedbacks Fields
FieldTypeReqKeyDescriptionComments
_idobjectIdtrue

Automatically generated object_id as primary key.

+
createdAtdatetrue

Timestamp with the feedback's creation date

+
updatedAtdatetrue

Timestamp with the feedback's last update date

+
ratingnumerictrue

A rating, in a scale of 1 to 5, of the application.

Currently present as: "How well does FIghtPandemics meet your needs?".

Present in the first part of the feedback and, therefore, is required.

-
ipAddressipv4true

Caputred IP address in order to get user's location even if they are not logged.

+
ipAddressipv4true

Caputred IP address in order to get user's location even if they are not logged.

Captured at the first part of the feedback and, therefore, is required.

-
ageinteger64false

User's age.

+
ageinteger64false

User's age.

Currently present as: "What is your age?".

Present in the third part of the feedback and, therefore, not required.

-
mostValuableFeaturestringfalse

User's feedback into what is the features most valuable for him/her.

+
mostValuableFeaturestringfalse

User's feedback into what is the features most valuable for him/her.

Currently present as: "Which features are the most valuable for you?".

Present in the second part of the feedback and, therefore, not required.

-
whatWouldChangestringfalse

User's feedback into what he/she would change about the application.

+
whatWouldChangestringfalse

User's feedback into what he/she would change about the application.

Currently present as: "If you could change one thing about FightPandemics, what would it be?".

Present in the second part of the feedback and, therefore, not required.

-
generalFeedbackstringfalse

User's general feedback section.

+
generalFeedbackstringfalse

User's general feedback section.

Currently present as: "Any other feedback for us?".

Present in the second part of the feedback and, therefore, not required.

-
covidImpactstringfalse

User's feedback into how the COVID impacted him.

+
covidImpactstringfalse

User's feedback into how the COVID impacted him.

Currently present as a multiple choice question.

Question: "How has COVID-19 impacted you?"

Options:

@@ -357,41 +357,41 @@
  • I am diagnosed with COVID-19
  • Present in the second part of the feedback and, therefore, not required.

    -
    userIdobjectIdfalse

    Reference to the user's _id.

    +
    userIdobjectIdfalse

    Reference to the user's _id.

    This will be present only if the user was logged in when completing the feedback.

    -
    locationdocumentfalse

    Location document according to the norms of a GeoJSON Object. +

    locationdocumentfalse

    Location document according to the norms of a GeoJSON Object. The fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.

    -
    coordinatesarraytrue

    Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

    -
    [0]numericfalse

    Location longitude

    -
    [1]numericfalse

    Location latitude

    -
    typestringtrue

    Type of the GeoJSON Object. +

    coordinatesarraytrue

    Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

    +
    [0]numericfalse

    Location longitude

    +
    [1]numericfalse

    Location latitude

    +
    typestringtrue

    Type of the GeoJSON Object. Please refer to the official documentation for more information.

    In our case, the value will always be of the type "Point".

    -
    countrystringfalse

    String holding the country's name.

    -
    citystringfalse

    String holding the city's name.

    -
    neighborhoodstringfalse

    String holding the neighborhood's name.

    -
    addressstringfalse

    String holding the address (street, number and other details).

    -
    2.1.2.2.3.1 Field createdAt
    2.1.2.2.3.1.1 createdAt Tree Diagram
    {dt}
    createdAt
    {dt}
    createdAt
    2.1.2.2.3.1.2 createdAt properties
    PropertyValue
    Name createdAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the feedback's creation date

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.2.3.2 Field _id
    2.1.2.2.3.2.1 _id Tree Diagram
    {_id}
    _id
    {_id}
    _id
    2.1.2.2.3.2.2 _id properties
    PropertyValue
    Name _id
    Technical name
    Id
    Type objectId
    Description

    Automatically generated object_id as primary key.

    -
    Dependencies
    Required true
    Primary key true
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.2.3.3 Field updatedAt
    2.1.2.2.3.3.1 updatedAt Tree Diagram
    {dt}
    updatedAt
    {dt}
    updatedAt
    2.1.2.2.3.3.2 updatedAt properties
    PropertyValue
    Name updatedAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the feedback's last update date

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.2.3.4 Field rating
    2.1.2.2.3.4.1 rating Tree Diagram
    {123}
    rating
    {123}
    rating
    2.1.2.2.3.4.2 rating properties
    PropertyValue
    Name rating
    Technical name
    Id
    Type numeric
    Subtype
    Description

    A rating, in a scale of 1 to 5, of the application.

    +
    countrystringfalse

    String holding the country's name.

    +
    citystringfalse

    String holding the city's name.

    +
    neighborhoodstringfalse

    String holding the neighborhood's name.

    +
    addressstringfalse

    String holding the address (street, number and other details).

    +
    2.1.2.2.3.1 Field createdAt
    2.1.2.2.3.1.1 createdAt Tree Diagram
    2.1.2.2.3.1.2 createdAt properties
    PropertyValue
    Name createdAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the feedback's creation date

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.2.3.2 Field _id
    2.1.2.2.3.2.1 _id Tree Diagram
    2.1.2.2.3.2.2 _id properties
    PropertyValue
    Name _id
    Technical name
    Id
    Type objectId
    Description

    Automatically generated object_id as primary key.

    +
    Dependencies
    Required true
    Primary key true
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.2.3.3 Field updatedAt
    2.1.2.2.3.3.1 updatedAt Tree Diagram
    2.1.2.2.3.3.2 updatedAt properties
    PropertyValue
    Name updatedAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the feedback's last update date

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.2.3.4 Field rating
    2.1.2.2.3.4.1 rating Tree Diagram
    2.1.2.2.3.4.2 rating properties
    PropertyValue
    Name rating
    Technical name
    Id
    Type numeric
    Subtype
    Description

    A rating, in a scale of 1 to 5, of the application.

    Currently present as: "How well does FIghtPandemics meet your needs?".

    Present in the first part of the feedback and, therefore, is required.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Unit
    Min value 1
    Excl min false
    Max value 5
    Excl max false
    Multiple of
    Divisible by
    Enum
    Sample
    Comments
    2.1.2.2.3.5 Field ipAddress
    2.1.2.2.3.5.1 ipAddress Tree Diagram
    {ABC}
    ipAddress
    {ABC}
    ipAddress
    2.1.2.2.3.5.2 ipAddress properties
    PropertyValue
    Name ipAddress
    Technical name
    Id
    Type string
    Description

    Caputred IP address in order to get user's location even if they are not logged.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Unit
    Min value 1
    Excl min false
    Max value 5
    Excl max false
    Multiple of
    Divisible by
    Enum
    Sample
    Comments
    2.1.2.2.3.5 Field ipAddress
    2.1.2.2.3.5.1 ipAddress Tree Diagram
    2.1.2.2.3.5.2 ipAddress properties
    PropertyValue
    Name ipAddress
    Technical name
    Id
    Type string
    Description

    Caputred IP address in order to get user's location even if they are not logged.

    Captured at the first part of the feedback and, therefore, is required.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format ipv4
    Enum
    Sample
    Comments
    2.1.2.2.3.6 Field age
    2.1.2.2.3.6.1 age Tree Diagram
    {123}
    age
    {123}
    age
    2.1.2.2.3.6.2 age properties
    PropertyValue
    Name age
    Technical name
    Id
    Type numeric
    Subtype integer64
    Description

    User's age.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format ipv4
    Enum
    Sample
    Comments
    2.1.2.2.3.6 Field age
    2.1.2.2.3.6.1 age Tree Diagram
    2.1.2.2.3.6.2 age properties
    PropertyValue
    Name age
    Technical name
    Id
    Type numeric
    Subtype integer64
    Description

    User's age.

    Currently present as: "What is your age?".

    Present in the third part of the feedback and, therefore, not required.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Unit
    Min value 18
    Excl min false
    Max value
    Excl max false
    Multiple of
    Divisible by
    Enum
    Sample
    Comments
    2.1.2.2.3.7 Field mostValuableFeature
    2.1.2.2.3.7.1 mostValuableFeature Tree Diagram
    {ABC}
    mostValuableFeature
    {ABC}
    mostValuableFeature
    2.1.2.2.3.7.2 mostValuableFeature properties
    PropertyValue
    Name mostValuableFeature
    Technical name
    Id
    Type string
    Description

    User's feedback into what is the features most valuable for him/her.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Unit
    Min value 18
    Excl min false
    Max value
    Excl max false
    Multiple of
    Divisible by
    Enum
    Sample
    Comments
    2.1.2.2.3.7 Field mostValuableFeature
    2.1.2.2.3.7.1 mostValuableFeature Tree Diagram
    2.1.2.2.3.7.2 mostValuableFeature properties
    PropertyValue
    Name mostValuableFeature
    Technical name
    Id
    Type string
    Description

    User's feedback into what is the features most valuable for him/her.

    Currently present as: "Which features are the most valuable for you?".

    Present in the second part of the feedback and, therefore, not required.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.2.3.8 Field whatWouldChange
    2.1.2.2.3.8.1 whatWouldChange Tree Diagram
    {ABC}
    whatWouldChange
    {ABC}
    whatWouldChange
    2.1.2.2.3.8.2 whatWouldChange properties
    PropertyValue
    Name whatWouldChange
    Technical name
    Id
    Type string
    Description

    User's feedback into what he/she would change about the application.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.2.3.8 Field whatWouldChange
    2.1.2.2.3.8.1 whatWouldChange Tree Diagram
    2.1.2.2.3.8.2 whatWouldChange properties
    PropertyValue
    Name whatWouldChange
    Technical name
    Id
    Type string
    Description

    User's feedback into what he/she would change about the application.

    Currently present as: "If you could change one thing about FightPandemics, what would it be?".

    Present in the second part of the feedback and, therefore, not required.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.2.3.9 Field generalFeedback
    2.1.2.2.3.9.1 generalFeedback Tree Diagram
    {ABC}
    generalFeedback
    {ABC}
    generalFeedback
    2.1.2.2.3.9.2 generalFeedback properties
    PropertyValue
    Name generalFeedback
    Technical name
    Id
    Type string
    Description

    User's general feedback section.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.2.3.9 Field generalFeedback
    2.1.2.2.3.9.1 generalFeedback Tree Diagram
    2.1.2.2.3.9.2 generalFeedback properties
    PropertyValue
    Name generalFeedback
    Technical name
    Id
    Type string
    Description

    User's general feedback section.

    Currently present as: "Any other feedback for us?".

    Present in the second part of the feedback and, therefore, not required.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.2.3.10 Field covidImpact
    2.1.2.2.3.10.1 covidImpact Tree Diagram
    {ABC}
    covidImpact
    {ABC}
    covidImpact
    2.1.2.2.3.10.2 covidImpact properties
    PropertyValue
    Name covidImpact
    Technical name
    Id
    Type string
    Description

    User's feedback into how the COVID impacted him.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.2.3.10 Field covidImpact
    2.1.2.2.3.10.1 covidImpact Tree Diagram
    2.1.2.2.3.10.2 covidImpact properties
    PropertyValue
    Name covidImpact
    Technical name
    Id
    Type string
    Description

    User's feedback into how the COVID impacted him.

    Currently present as a multiple choice question.

    Question: "How has COVID-19 impacted you?"

    Options:

    @@ -402,9 +402,9 @@
  • I am diagnosed with COVID-19
  • Present in the second part of the feedback and, therefore, not required.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.2.3.11 Field userId
    2.1.2.2.3.11.1 userId Tree Diagram
    {_id}
    userId
    {_id}
    userId
    2.1.2.2.3.11.2 userId properties
    PropertyValue
    Name userId
    Technical name
    Id
    Type objectId
    Description

    Reference to the user's _id.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.2.3.11 Field userId
    2.1.2.2.3.11.1 userId Tree Diagram
    2.1.2.2.3.11.2 userId properties
    PropertyValue
    Name userId
    Technical name
    Id
    Type objectId
    Description

    Reference to the user's _id.

    This will be present only if the user was logged in when completing the feedback.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection users
    Foreign field _id
    Relationship type Foreign Key
    Default
    Sample
    Comments
    2.1.2.2.3.12 Field location
    2.1.2.2.3.12.1 location Tree Diagram
    location
    ref:
    location (m)
    location
    ref:
    location (m)
    2.1.2.2.3.12.2 location properties
    PropertyValue
    Name location
    $ref#model/definitions/location
    Reference type model
    2.1.2.2.4 feedbacks JSON Schema
    {
    +
    Dependencies
    Required false
    Primary key false
    Foreign collection users
    Foreign field _id
    Relationship type Foreign Key
    Default
    Sample
    Comments
    2.1.2.2.3.12 Field location
    2.1.2.2.3.12.1 location Tree Diagram
    2.1.2.2.3.12.2 location properties
    PropertyValue
    Name location
    Technical name
    $ref#model/definitions/location
    Reference type model
    Reference description
    2.1.2.2.4 feedbacks JSON Schema
    {
         "$schema": "http://json-schema.org/draft-04/schema#",
         "type": "object",
         "title": "feedbacks",
    @@ -438,7 +438,7 @@
                 "format": "ipv4"
             },
             "age": {
    -            "type": "long",
    +            "type": "integer",
                 "description": "User's age.\n\nCurrently present as: \"What is your age?\".\n\nPresent in the third part of the feedback and, therefore, not required.",
                 "minimum": 18
             },
    @@ -626,60 +626,460 @@
         },
         "validationLevel": "off",
         "validationAction": "warn"
    -});
    2.1.2.3 Collection posts
    2.1.2.3.1 posts Tree Diagram
    posts
    {_id}
    _id
    {dt}
    createdAt
    {dt}
    updatedAt
    {dt}
    expireAt
    author
    ref:
    author (m)
    {ABC}
    title
    {ABC}
    content
    {ABC}
    objective
    {ABC}
    visibility
    [...]
    likes
    [...]
    types
    [...]
    language
    {...}
    externalLinks
    {_id}
    id
    {ABC}
    name
    {ABC}
    type
    location
    ref:
    location (m)
    {_id}
    [0]*
    {ABC}
    [0]*
    {ABC}
    [0]*
    {ABC}
    email
    {ABC}
    website
    {ABC}
    playStore
    {ABC}
    appStore
    [...]
    coordinates
    {ABC}
    type
    {ABC}
    country
    {ABC}
    city
    {ABC}
    neighborhood
    {ABC}
    address
    {123}
    [0]
    {123}
    [1]+
    posts
    {_id}
    _id
    {dt}
    createdAt
    {dt}
    updatedAt
    {dt}
    expireAt
    author
    ref:
    author (m)
    {ABC}
    title
    {ABC}
    content
    {ABC}
    objective
    {ABC}
    visibility
    [...]
    likes
    [...]
    types
    [...]
    language
    {...}
    externalLinks
    {_id}
    id
    {ABC}
    name
    {ABC}
    type
    location
    ref:
    location (m)
    {_id}
    [0]*
    {ABC}
    [0]*
    {ABC}
    [0]*
    {ABC}
    email
    {ABC}
    website
    {ABC}
    playStore
    {ABC}
    appStore
    [...]
    coordinates
    {ABC}
    type
    {ABC}
    country
    {ABC}
    city
    {ABC}
    neighborhood
    {ABC}
    address
    {123}
    [0]
    {123}
    [1]+
    2.1.2.3.2 posts Properties
    PropertyValue
    Collection nameposts
    Technical name
    Id
    Description

    Document to represent a post, asking or offering help to be displayed on the feed

    -
    DatabaseapplicationDB
    Cappedfalse
    Size
    Max
    Storage engineWiredTiger
    Config String
    Validation levelOff
    Validation actionWarn
    Additional propertiesfalse
    Comments
    2.1.2.3.3 posts Fields
    FieldTypeReqKeyDescriptionComments
    _idobjectIdtrue
    createdAtdatetrue

    Timestamp with the post's creation date

    -
    updatedAtdatetrue

    Timestamp with the post's last update date

    -
    expireAtdatefalse

    Timestamp with the date the post will expire. +});

    2.1.2.3 Collection messages
    2.1.2.3.1 messages Tree Diagram
    2.1.2.3.2 messages Properties
    PropertyValue
    Collection namemessages
    Technical name
    Id
    Description

    Message sent in a private conversation

    +
    DatabaseapplicationDB
    Cappedfalse
    Size
    Max
    Storage engineWiredTiger
    Config String
    Validation levelOff
    Validation actionWarn
    Additional propertiesfalse
    Comments
    2.1.2.3.3 messages Fields
    FieldTypeReqKeyDescriptionComments
    _idobjectIdtrue

    ObjectId used as primary key for a message

    +
    createdAtdatetrue

    Timestamp with message's creation date

    +
    updatedAtdatetrue

    Timestamp with message's update date

    +
    contentstringtrue

    Messages content, containing html links and emojis

    +
    threadIdobjectIdtrue

    Reference to the thread were the message was sent

    +
    authordocumenttrue
    idobjectIdtrue

    Foreign key to the user who created the post.

    +
    namestringtrue
    typestringtrue
    locationdocumenttrue

    Location document according to the norms of a GeoJSON Object. +The fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.

    +
    coordinatesarraytrue

    Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

    +
    [0]numericfalse

    Location longitude

    +
    [1]numericfalse

    Location latitude

    +
    typestringtrue

    Type of the GeoJSON Object. +Please refer to the official documentation for more information.

    +

    In our case, the value will always be of the type "Point".

    +
    countrystringfalse

    String holding the country's name.

    +
    citystringfalse

    String holding the city's name.

    +
    neighborhoodstringfalse

    String holding the neighborhood's name.

    +
    addressstringfalse

    String holding the address (street, number and other details).

    +
    statusstringtrue

    Curerent message status, used to define if it was edited or deleted:

    +
      +
    • sent: message was sent and not edited or deleted.
    • +
    • edited: message was edited by the author
    • +
    • deleted: message was deleted by the author
    • +
    +
    postRefdocumentfalse

    Optional post reference, allowing a post to be referenced in a message thread.

    +
    idobjectIdtrue
    objectivestringtrue

    Field to indicate the post's objective. +Currently only two values allowed: "offering help" and "looking for help".

    +
    titlestringtrue

    The post title.

    +
    contentstringtrue

    String for the post content.

    +
    authordocumenttrue
    idobjectIdtrue

    Foreign key to the user who created the post.

    +
    namestringtrue
    typestringtrue
    locationdocumenttrue

    Location document according to the norms of a GeoJSON Object. +The fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.

    +
    coordinatesarraytrue

    Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

    +
    [0]numericfalse

    Location longitude

    +
    [1]numericfalse

    Location latitude

    +
    typestringtrue

    Type of the GeoJSON Object. +Please refer to the official documentation for more information.

    +

    In our case, the value will always be of the type "Point".

    +
    countrystringfalse

    String holding the country's name.

    +
    citystringfalse

    String holding the city's name.

    +
    neighborhoodstringfalse

    String holding the neighborhood's name.

    +
    addressstringfalse

    String holding the address (street, number and other details).

    +
    2.1.2.3.3.1 Field _id
    2.1.2.3.3.1.1 _id Tree Diagram
    2.1.2.3.3.1.2 _id properties
    PropertyValue
    Name _id
    Technical name
    Id
    Type objectId
    Description

    ObjectId used as primary key for a message

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.3.3.2 Field createdAt
    2.1.2.3.3.2.1 createdAt Tree Diagram
    2.1.2.3.3.2.2 createdAt properties
    PropertyValue
    Name createdAt
    Technical name
    Id
    Type date
    Description

    Timestamp with message's creation date

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.3.3.3 Field updatedAt
    2.1.2.3.3.3.1 updatedAt Tree Diagram
    2.1.2.3.3.3.2 updatedAt properties
    PropertyValue
    Name updatedAt
    Technical name
    Id
    Type date
    Description

    Timestamp with message's update date

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.3.3.4 Field content
    2.1.2.3.3.4.1 content Tree Diagram
    2.1.2.3.3.4.2 content properties
    PropertyValue
    Name content
    Technical name
    Id
    Type string
    Description

    Messages content, containing html links and emojis

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.3.3.5 Field threadId
    2.1.2.3.3.5.1 threadId Tree Diagram
    2.1.2.3.3.5.2 threadId properties
    PropertyValue
    Name threadId
    Technical name
    Id
    Type objectId
    Description

    Reference to the thread were the message was sent

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection thread
    Foreign field _id
    Relationship type Foreign Key
    Default
    Sample
    Comments
    2.1.2.3.3.6 Field author
    2.1.2.3.3.6.1 author Tree Diagram
    2.1.2.3.3.6.2 author properties
    PropertyValue
    Name author
    Technical name
    $ref#model/definitions/author
    Reference type model
    Reference description
    2.1.2.3.3.7 Field status
    2.1.2.3.3.7.1 status Tree Diagram
    2.1.2.3.3.7.2 status properties
    PropertyValue
    Name status
    Technical name
    Id
    Type string
    Description

    Curerent message status, used to define if it was edited or deleted:

    +
      +
    • sent: message was sent and not edited or deleted.
    • +
    • edited: message was edited by the author
    • +
    • deleted: message was deleted by the author
    • +
    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default sent
    Min length
    Max length
    Pattern
    Format
    Enum edited,deleted,sent
    Sample
    Comments
    2.1.2.3.3.8 Field postRef
    2.1.2.3.3.8.1 postRef Tree Diagram
    2.1.2.3.3.8.2 postRef properties
    PropertyValue
    Name postRef
    Technical name
    $ref#model/definitions/postRef
    Reference type model
    Reference description
    2.1.2.3.4 messages JSON Schema
    {
    +    "$schema": "http://json-schema.org/draft-04/schema#",
    +    "type": "object",
    +    "title": "messages",
    +    "description": "Message sent in a private conversation\n",
    +    "additionalProperties": false,
    +    "properties": {
    +        "_id": {
    +            "type": "string",
    +            "description": "ObjectId used as primary key for a message",
    +            "pattern": "^[a-fA-F0-9]{24}$"
    +        },
    +        "createdAt": {
    +            "type": "string",
    +            "description": "Timestamp with message's creation date",
    +            "format": "date-time"
    +        },
    +        "updatedAt": {
    +            "type": "string",
    +            "description": "Timestamp with message's update date",
    +            "format": "date-time"
    +        },
    +        "content": {
    +            "type": "string",
    +            "description": "Messages content, containing html links and emojis "
    +        },
    +        "threadId": {
    +            "type": "string",
    +            "description": "Reference to the thread were the message was sent",
    +            "pattern": "^[a-fA-F0-9]{24}$"
    +        },
    +        "author": {
    +            "$ref": "#model/definitions/author"
    +        },
    +        "status": {
    +            "type": "string",
    +            "description": "Curerent message status, used to define if it was edited or deleted:\n\n* **sent**: message was sent and not edited or deleted.\n* **edited**: message was edited by the author\n* **deleted**: message was deleted by the author",
    +            "default": "sent",
    +            "enum": [
    +                "edited",
    +                "deleted",
    +                "sent"
    +            ]
    +        },
    +        "postRef": {
    +            "$ref": "#model/definitions/postRef"
    +        }
    +    },
    +    "required": [
    +        "_id",
    +        "createdAt",
    +        "updatedAt",
    +        "content",
    +        "threadId",
    +        "author",
    +        "status"
    +    ]
    +}
    2.1.2.3.5 messages JSON data
    {
    +    "_id": ObjectId("507f1f77bcf86cd799439011"),
    +    "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
    +    "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
    +    "content": "Lorem",
    +    "threadId": ObjectId("507f1f77bcf86cd799439011"),
    +    "author": {
    +        "id": ObjectId("507f1f77bcf86cd799439011"),
    +        "name": "Lorem",
    +        "type": "Lorem",
    +        "location": {
    +            "coordinates": [
    +                35.26,
    +                -32.83
    +            ],
    +            "type": "Point",
    +            "country": "Lorem",
    +            "city": "Lorem",
    +            "neighborhood": "Lorem",
    +            "address": "Lorem"
    +        }
    +    },
    +    "status": "sent",
    +    "postRef": {
    +        "id": ObjectId("507f1f77bcf86cd799439011"),
    +        "objective": "offer",
    +        "title": "Lorem",
    +        "content": "Lorem",
    +        "author": {
    +            "id": ObjectId("507f1f77bcf86cd799439011"),
    +            "name": "Lorem",
    +            "type": "Lorem",
    +            "location": {
    +                "coordinates": [
    +                    35.26,
    +                    -32.83
    +                ],
    +                "type": "Point",
    +                "country": "Lorem",
    +                "city": "Lorem",
    +                "neighborhood": "Lorem",
    +                "address": "Lorem"
    +            }
    +        }
    +    }
    +}
    2.1.2.3.6 messages Target Script
    use applicationDB;
    +
    +db.createCollection( "messages",{
    +    "storageEngine": {
    +        "wiredTiger": {}
    +    },
    +    "capped": false,
    +    "validator": {
    +        "$jsonSchema": {
    +            "bsonType": "object",
    +            "title": "messages",
    +            "description": "Message sent in a private conversation\n",
    +            "additionalProperties": false,
    +            "properties": {
    +                "_id": {
    +                    "bsonType": "objectId",
    +                    "description": "ObjectId used as primary key for a message"
    +                },
    +                "createdAt": {
    +                    "bsonType": "date",
    +                    "description": "Timestamp with message's creation date"
    +                },
    +                "updatedAt": {
    +                    "bsonType": "date",
    +                    "description": "Timestamp with message's update date"
    +                },
    +                "content": {
    +                    "bsonType": "string",
    +                    "description": "Messages content, containing html links and emojis "
    +                },
    +                "threadId": {
    +                    "bsonType": "objectId",
    +                    "description": "Reference to the thread were the message was sent"
    +                },
    +                "author": {
    +                    "bsonType": "object",
    +                    "properties": {
    +                        "id": {
    +                            "bsonType": "objectId",
    +                            "description": "Foreign key to the user who created the post."
    +                        },
    +                        "name": {
    +                            "bsonType": "string"
    +                        },
    +                        "type": {
    +                            "bsonType": "string"
    +                        },
    +                        "location": {
    +                            "bsonType": "object",
    +                            "description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.",
    +                            "properties": {
    +                                "coordinates": {
    +                                    "bsonType": "array",
    +                                    "description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.",
    +                                    "additionalItems": true,
    +                                    "minItems": 2,
    +                                    "maxItems": 2,
    +                                    "uniqueItems": false,
    +                                    "items": [
    +                                        {
    +                                            "bsonType": "number",
    +                                            "description": "Location longitude\n",
    +                                            "minimum": -180,
    +                                            "maximum": 180
    +                                        },
    +                                        {
    +                                            "bsonType": "number",
    +                                            "description": "Location latitude\n",
    +                                            "minimum": -90,
    +                                            "maximum": 90
    +                                        }
    +                                    ]
    +                                },
    +                                "type": {
    +                                    "bsonType": "string",
    +                                    "description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**",
    +                                    "enum": [
    +                                        "Point"
    +                                    ]
    +                                },
    +                                "country": {
    +                                    "bsonType": "string",
    +                                    "description": "String holding the country's name.\n"
    +                                },
    +                                "city": {
    +                                    "bsonType": "string",
    +                                    "description": "String holding the city's name."
    +                                },
    +                                "neighborhood": {
    +                                    "bsonType": "string",
    +                                    "description": "String holding the neighborhood's name."
    +                                },
    +                                "address": {
    +                                    "bsonType": "string",
    +                                    "description": "String holding the address (street, number and other details)."
    +                                }
    +                            },
    +                            "additionalProperties": false,
    +                            "required": [
    +                                "coordinates",
    +                                "type"
    +                            ]
    +                        }
    +                    },
    +                    "additionalProperties": false,
    +                    "required": [
    +                        "id",
    +                        "name",
    +                        "type"
    +                    ]
    +                },
    +                "status": {
    +                    "bsonType": "string",
    +                    "description": "Curerent message status, used to define if it was edited or deleted:\n\n* **sent**: message was sent and not edited or deleted.\n* **edited**: message was edited by the author\n* **deleted**: message was deleted by the author",
    +                    "enum": [
    +                        "edited",
    +                        "deleted",
    +                        "sent"
    +                    ]
    +                },
    +                "postRef": {
    +                    "bsonType": "object",
    +                    "description": "Optional post reference, allowing a post to be referenced in a message thread.",
    +                    "properties": {
    +                        "id": {
    +                            "bsonType": "objectId"
    +                        },
    +                        "objective": {
    +                            "bsonType": "string",
    +                            "description": "Field to indicate the post's objective.\nCurrently only two values allowed: \"offering help\" and \"looking for help\".",
    +                            "enum": [
    +                                "request",
    +                                "offer"
    +                            ]
    +                        },
    +                        "title": {
    +                            "bsonType": "string",
    +                            "description": "The post title."
    +                        },
    +                        "content": {
    +                            "bsonType": "string",
    +                            "description": "String for the post content."
    +                        },
    +                        "author": {
    +                            "bsonType": "object",
    +                            "properties": {
    +                                "id": {
    +                                    "bsonType": "objectId",
    +                                    "description": "Foreign key to the user who created the post."
    +                                },
    +                                "name": {
    +                                    "bsonType": "string"
    +                                },
    +                                "type": {
    +                                    "bsonType": "string"
    +                                },
    +                                "location": {
    +                                    "bsonType": "object",
    +                                    "description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.",
    +                                    "properties": {
    +                                        "coordinates": {
    +                                            "bsonType": "array",
    +                                            "description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.",
    +                                            "additionalItems": true,
    +                                            "minItems": 2,
    +                                            "maxItems": 2,
    +                                            "uniqueItems": false,
    +                                            "items": [
    +                                                {
    +                                                    "bsonType": "number",
    +                                                    "description": "Location longitude\n",
    +                                                    "minimum": -180,
    +                                                    "maximum": 180
    +                                                },
    +                                                {
    +                                                    "bsonType": "number",
    +                                                    "description": "Location latitude\n",
    +                                                    "minimum": -90,
    +                                                    "maximum": 90
    +                                                }
    +                                            ]
    +                                        },
    +                                        "type": {
    +                                            "bsonType": "string",
    +                                            "description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**",
    +                                            "enum": [
    +                                                "Point"
    +                                            ]
    +                                        },
    +                                        "country": {
    +                                            "bsonType": "string",
    +                                            "description": "String holding the country's name.\n"
    +                                        },
    +                                        "city": {
    +                                            "bsonType": "string",
    +                                            "description": "String holding the city's name."
    +                                        },
    +                                        "neighborhood": {
    +                                            "bsonType": "string",
    +                                            "description": "String holding the neighborhood's name."
    +                                        },
    +                                        "address": {
    +                                            "bsonType": "string",
    +                                            "description": "String holding the address (street, number and other details)."
    +                                        }
    +                                    },
    +                                    "additionalProperties": false,
    +                                    "required": [
    +                                        "coordinates",
    +                                        "type"
    +                                    ]
    +                                }
    +                            },
    +                            "additionalProperties": false,
    +                            "required": [
    +                                "id",
    +                                "name",
    +                                "type"
    +                            ]
    +                        }
    +                    },
    +                    "additionalProperties": false,
    +                    "required": [
    +                        "id",
    +                        "objective",
    +                        "title",
    +                        "content",
    +                        "author"
    +                    ]
    +                }
    +            },
    +            "required": [
    +                "_id",
    +                "createdAt",
    +                "updatedAt",
    +                "content",
    +                "threadId",
    +                "author",
    +                "status"
    +            ]
    +        }
    +    },
    +    "validationLevel": "off",
    +    "validationAction": "warn"
    +});
    2.1.2.4 Collection posts
    2.1.2.4.1 posts Tree Diagram
    2.1.2.4.2 posts Properties
    PropertyValue
    Collection nameposts
    Technical name
    Id
    Description

    Document to represent a post, asking or offering help to be displayed on the feed

    +
    DatabaseapplicationDB
    Cappedfalse
    Size
    Max
    Storage engineWiredTiger
    Config String
    Validation levelOff
    Validation actionWarn
    Additional propertiesfalse
    Comments
    2.1.2.4.3 posts Fields
    FieldTypeReqKeyDescriptionComments
    _idobjectIdtrue
    createdAtdatetrue

    Timestamp with the post's creation date

    +
    updatedAtdatetrue

    Timestamp with the post's last update date

    +
    expireAtdatefalse

    Timestamp with the date the post will expire. If no expiration date is present, the post does not expire.

    -
    authordocumenttrue
    idobjectIdtrue

    Foreign key to the user who created the post.

    -
    namestringtrue
    typestringtrue
    locationdocumenttrue

    Location document according to the norms of a GeoJSON Object. +

    authordocumenttrue
    idobjectIdtrue

    Foreign key to the user who created the post.

    +
    namestringtrue
    typestringtrue
    locationdocumenttrue

    Location document according to the norms of a GeoJSON Object. The fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.

    -
    coordinatesarraytrue

    Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

    -
    [0]numericfalse

    Location longitude

    -
    [1]numericfalse

    Location latitude

    -
    typestringtrue

    Type of the GeoJSON Object. +

    coordinatesarraytrue

    Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

    +
    [0]numericfalse

    Location longitude

    +
    [1]numericfalse

    Location latitude

    +
    typestringtrue

    Type of the GeoJSON Object. Please refer to the official documentation for more information.

    In our case, the value will always be of the type "Point".

    -
    countrystringfalse

    String holding the country's name.

    -
    citystringfalse

    String holding the city's name.

    -
    neighborhoodstringfalse

    String holding the neighborhood's name.

    -
    addressstringfalse

    String holding the address (street, number and other details).

    -
    titlestringtrue

    The post title.

    -
    contentstringtrue

    String for the post content.

    -
    objectivestringtrue

    Field to indicate the post's objective. +

    countrystringfalse

    String holding the country's name.

    +
    citystringfalse

    String holding the city's name.

    +
    neighborhoodstringfalse

    String holding the neighborhood's name.

    +
    addressstringfalse

    String holding the address (street, number and other details).

    +
    titlestringtrue

    The post title.

    +
    contentstringtrue

    String for the post content.

    +
    objectivestringtrue

    Field to indicate the post's objective. Currently only two values allowed: "offering help" and "looking for help".

    -
    visibilitystringtrue

    Field to specify the post's visibility. It can be: worldwide, country, state and zipcode.

    -
    likesarraytrue

    Array holding the user_id of all the users who liked the post.

    -
    [0]objectIdfalse

    _id of the user who liked the post

    -
    typesarrayfalse

    Array with the post's tags. +

    visibilitystringtrue

    Field to specify the post's visibility. It can be: worldwide, country, state and zipcode.

    +
    likesarraytrue

    Array holding the user_id of all the users who liked the post.

    +
    [0]objectIdfalse

    _id of the user who liked the post

    +
    typesarrayfalse

    Array with the post's tags. Can be: Medical Supplies, Groceries/Food, Business, Education, Legal, Wellbeing/Mental, Entertainment, Information, Funding, R&D and Others

    -
    [0]stringfalse
    languagearrayfalse
    [0]stringfalse
    externalLinksdocumentfalse
    emailstringfalse

    An email related to the post's content.

    -
    websitestringfalse

    Link for a website related to the post's content.

    -
    playStorestringfalse

    Link for a Play Store application related to the post's content.

    -
    appStorestringfalse

    Link for a AppStore application related to the post's content.

    -
    2.1.2.3.3.1 Field _id
    2.1.2.3.3.1.1 _id Tree Diagram
    {_id}
    _id
    {_id}
    _id
    2.1.2.3.3.1.2 _id properties
    PropertyValue
    Name _id
    Technical name
    Id
    Type objectId
    Description
    Dependencies
    Required true
    Primary key true
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.3.3.2 Field createdAt
    2.1.2.3.3.2.1 createdAt Tree Diagram
    {dt}
    createdAt
    {dt}
    createdAt
    2.1.2.3.3.2.2 createdAt properties
    PropertyValue
    Name createdAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the post's creation date

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.3.3.3 Field updatedAt
    2.1.2.3.3.3.1 updatedAt Tree Diagram
    {dt}
    updatedAt
    {dt}
    updatedAt
    2.1.2.3.3.3.2 updatedAt properties
    PropertyValue
    Name updatedAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the post's last update date

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.3.3.4 Field expireAt
    2.1.2.3.3.4.1 expireAt Tree Diagram
    {dt}
    expireAt
    {dt}
    expireAt
    2.1.2.3.3.4.2 expireAt properties
    PropertyValue
    Name expireAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the date the post will expire. +

    [0]stringfalse
    languagearrayfalse
    [0]stringfalse
    externalLinksdocumentfalse
    emailstringfalse

    An email related to the post's content.

    +
    websitestringfalse

    Link for a website related to the post's content.

    +
    playStorestringfalse

    Link for a Play Store application related to the post's content.

    +
    appStorestringfalse

    Link for a AppStore application related to the post's content.

    +
    2.1.2.4.3.1 Field _id
    2.1.2.4.3.1.1 _id Tree Diagram
    2.1.2.4.3.1.2 _id properties
    PropertyValue
    Name _id
    Technical name
    Id
    Type objectId
    Description
    Dependencies
    Required true
    Primary key true
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.4.3.2 Field createdAt
    2.1.2.4.3.2.1 createdAt Tree Diagram
    2.1.2.4.3.2.2 createdAt properties
    PropertyValue
    Name createdAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the post's creation date

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.4.3.3 Field updatedAt
    2.1.2.4.3.3.1 updatedAt Tree Diagram
    2.1.2.4.3.3.2 updatedAt properties
    PropertyValue
    Name updatedAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the post's last update date

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.4.3.4 Field expireAt
    2.1.2.4.3.4.1 expireAt Tree Diagram
    2.1.2.4.3.4.2 expireAt properties
    PropertyValue
    Name expireAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the date the post will expire. If no expiration date is present, the post does not expire.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.3.3.5 Field author
    2.1.2.3.3.5.1 author Tree Diagram
    author
    ref:
    author (m)
    author
    ref:
    author (m)
    2.1.2.3.3.5.2 author properties
    PropertyValue
    Name author
    $ref#model/definitions/author
    Reference type model
    2.1.2.3.3.6 Field title
    2.1.2.3.3.6.1 title Tree Diagram
    {ABC}
    title
    {ABC}
    title
    2.1.2.3.3.6.2 title properties
    PropertyValue
    Name title
    Technical name
    Id
    Type string
    Description

    The post title.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.3.3.7 Field content
    2.1.2.3.3.7.1 content Tree Diagram
    {ABC}
    content
    {ABC}
    content
    2.1.2.3.3.7.2 content properties
    PropertyValue
    Name content
    Technical name
    Id
    Type string
    Description

    String for the post content.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.3.3.8 Field objective
    2.1.2.3.3.8.1 objective Tree Diagram
    {ABC}
    objective
    {ABC}
    objective
    2.1.2.3.3.8.2 objective properties
    PropertyValue
    Name objective
    Technical name
    Id
    Type string
    Description

    Field to indicate the post's objective. +

    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.4.3.5 Field author
    2.1.2.4.3.5.1 author Tree Diagram
    2.1.2.4.3.5.2 author properties
    PropertyValue
    Name author
    Technical name
    $ref#model/definitions/author
    Reference type model
    Reference description
    2.1.2.4.3.6 Field title
    2.1.2.4.3.6.1 title Tree Diagram
    2.1.2.4.3.6.2 title properties
    PropertyValue
    Name title
    Technical name
    Id
    Type string
    Description

    The post title.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.3.7 Field content
    2.1.2.4.3.7.1 content Tree Diagram
    2.1.2.4.3.7.2 content properties
    PropertyValue
    Name content
    Technical name
    Id
    Type string
    Description

    String for the post content.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.3.8 Field objective
    2.1.2.4.3.8.1 objective Tree Diagram
    2.1.2.4.3.8.2 objective properties
    PropertyValue
    Name objective
    Technical name
    Id
    Type string
    Description

    Field to indicate the post's objective. Currently only two values allowed: "offering help" and "looking for help".

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum request,offer
    Sample offer
    Comments
    2.1.2.3.3.9 Field visibility
    2.1.2.3.3.9.1 visibility Tree Diagram
    {ABC}
    visibility
    {ABC}
    visibility
    2.1.2.3.3.9.2 visibility properties
    PropertyValue
    Name visibility
    Technical name
    Id
    Type string
    Description

    Field to specify the post's visibility. It can be: worldwide, country, state and zipcode.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum zipcode,state,country,worldwide
    Sample
    Comments
    2.1.2.3.3.10 Field likes
    2.1.2.3.3.10.1 likes Tree Diagram
    [...]
    likes
    {_id}
    [0]*
    [...]
    likes
    {_id}
    [0]*
    2.1.2.3.3.10.2 likes Hierarchy
    Parent field: location
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    [0]objectIdfalsefk

    _id of the user who liked the post

    -
    2.1.2.3.3.10.3 likes properties
    PropertyValue
    Name likes
    Technical name
    Id
    Type array
    Description

    Array holding the user_id of all the users who liked the post.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Min items
    Max items
    Unique items true
    Additional items true
    Comments
    2.1.2.3.3.11 Field [0]
    2.1.2.3.3.11.1 [0] Tree Diagram
    {_id}
    [0]
    {_id}
    [0]
    2.1.2.3.3.11.2 [0] properties
    PropertyValue
    Id
    Type objectId
    Description

    _id of the user who liked the post

    -
    Dependencies
    Primary key false
    Foreign collection users
    Foreign field _id
    Relationship type Foreign Key
    Default
    Sample
    Comments
    2.1.2.3.3.12 Field types
    2.1.2.3.3.12.1 types Tree Diagram
    [...]
    types
    {ABC}
    [0]*
    [...]
    types
    {ABC}
    [0]*
    2.1.2.3.3.12.2 types Hierarchy
    Parent field: coordinates
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    [0]stringfalse
    2.1.2.3.3.12.3 types properties
    PropertyValue
    Name types
    Technical name
    Id
    Type array
    Description

    Array with the post's tags. +

    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum request,offer
    Sample offer
    Comments
    2.1.2.4.3.9 Field visibility
    2.1.2.4.3.9.1 visibility Tree Diagram
    2.1.2.4.3.9.2 visibility properties
    PropertyValue
    Name visibility
    Technical name
    Id
    Type string
    Description

    Field to specify the post's visibility. It can be: worldwide, country, state and zipcode.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum zipcode,state,country,worldwide
    Sample
    Comments
    2.1.2.4.3.10 Field likes
    2.1.2.4.3.10.1 likes Tree Diagram
    2.1.2.4.3.10.2 likes Hierarchy
    Parent field: posts
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    [0]objectIdfalsefk

    _id of the user who liked the post

    +
    2.1.2.4.3.10.3 likes properties
    PropertyValue
    Name likes
    Technical name
    Id
    Type array
    Description

    Array holding the user_id of all the users who liked the post.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Min items
    Max items
    Unique items true
    Additional items true
    Comments
    2.1.2.4.3.11 Field [0]
    2.1.2.4.3.11.1 [0] Tree Diagram
    2.1.2.4.3.11.2 [0] properties
    PropertyValue
    Display name
    Id
    Type objectId
    Description

    _id of the user who liked the post

    +
    Dependencies
    Primary key false
    Foreign collection users
    Foreign field _id
    Relationship type Foreign Key
    Default
    Sample
    Comments
    2.1.2.4.3.12 Field types
    2.1.2.4.3.12.1 types Tree Diagram
    2.1.2.4.3.12.2 types Hierarchy
    Parent field: posts
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    [0]stringfalse
    2.1.2.4.3.12.3 types properties
    PropertyValue
    Name types
    Technical name
    Id
    Type array
    Description

    Array with the post's tags. Can be: Medical Supplies, Groceries/Food, Business, Education, Legal, Wellbeing/Mental, Entertainment, Information, Funding, R&D and Others

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Min items
    Max items
    Unique items false
    Additional items true
    Comments
    2.1.2.3.3.13 Field type
    2.1.2.3.3.13.1 type Tree Diagram
    {ABC}
    type
    {ABC}
    type
    2.1.2.3.3.13.2 type properties
    PropertyValue
    Id
    Type string
    Description
    Dependencies
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum Medical Supplies,Groceries/Food,Business,Education,Legal,Wellbeing/Mental,Entertainment,Information,Funding,R&D,Others
    Sample Groceries/Food
    Comments
    2.1.2.3.3.14 Field language
    2.1.2.3.3.14.1 language Tree Diagram
    [...]
    language
    {ABC}
    [0]*
    [...]
    language
    {ABC}
    [0]*
    2.1.2.3.3.14.2 language Hierarchy
    Parent field: location
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    [0]stringfalse
    2.1.2.3.3.14.3 language properties
    PropertyValue
    Name language
    Technical name
    Id
    Type array
    Description
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Min items
    Max items
    Unique items false
    Additional items true
    Comments
    2.1.2.3.3.15 Field city
    2.1.2.3.3.15.1 city Tree Diagram
    {ABC}
    city
    {ABC}
    city
    2.1.2.3.3.15.2 city properties
    PropertyValue
    Id
    Type string
    Description
    Dependencies
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.3.3.16 Field externalLinks
    2.1.2.3.3.16.1 externalLinks Tree Diagram
    {...}
    externalLinks
    {ABC}
    email
    {ABC}
    website
    {ABC}
    playStore
    {ABC}
    appStore
    {...}
    externalLinks
    {ABC}
    email
    {ABC}
    website
    {ABC}
    playStore
    {ABC}
    appStore
    2.1.2.3.3.16.2 externalLinks Hierarchy
    Parent field: location
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    emailstringfalse

    An email related to the post's content.

    -
    websitestringfalse

    Link for a website related to the post's content.

    -
    playStorestringfalse

    Link for a Play Store application related to the post's content.

    -
    appStorestringfalse

    Link for a AppStore application related to the post's content.

    -
    2.1.2.3.3.16.3 externalLinks properties
    PropertyValue
    Name externalLinks
    Technical name
    Id
    Type document
    Description
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.3.3.17 Field email
    2.1.2.3.3.17.1 email Tree Diagram
    {ABC}
    email
    {ABC}
    email
    2.1.2.3.3.17.2 email properties
    PropertyValue
    Name email
    Technical name
    Id
    Type string
    Description

    An email related to the post's content.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.3.3.18 Field website
    2.1.2.3.3.18.1 website Tree Diagram
    {ABC}
    website
    {ABC}
    website
    2.1.2.3.3.18.2 website properties
    PropertyValue
    Name website
    Technical name
    Id
    Type string
    Description

    Link for a website related to the post's content.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.3.3.19 Field playStore
    2.1.2.3.3.19.1 playStore Tree Diagram
    {ABC}
    playStore
    {ABC}
    playStore
    2.1.2.3.3.19.2 playStore properties
    PropertyValue
    Name playStore
    Technical name
    Id
    Type string
    Description

    Link for a Play Store application related to the post's content.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.3.3.20 Field appStore
    2.1.2.3.3.20.1 appStore Tree Diagram
    {ABC}
    appStore
    {ABC}
    appStore
    2.1.2.3.3.20.2 appStore properties
    PropertyValue
    Name appStore
    Technical name
    Id
    Type string
    Description

    Link for a AppStore application related to the post's content.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.3.4 posts JSON Schema
    {
    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Min items
    Max items
    Unique items false
    Additional items true
    Comments
    2.1.2.4.3.13 Field [0]
    2.1.2.4.3.13.1 [0] Tree Diagram
    2.1.2.4.3.13.2 [0] properties
    PropertyValue
    Display name
    Id
    Type string
    Description
    Dependencies
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum Medical Supplies,Groceries/Food,Business,Education,Legal,Wellbeing/Mental,Entertainment,Information,Funding,R&D,Others
    Sample Groceries/Food
    Comments
    2.1.2.4.3.14 Field language
    2.1.2.4.3.14.1 language Tree Diagram
    2.1.2.4.3.14.2 language Hierarchy
    Parent field: posts
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    [0]stringfalse
    2.1.2.4.3.14.3 language properties
    PropertyValue
    Name language
    Technical name
    Id
    Type array
    Description
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Min items
    Max items
    Unique items false
    Additional items true
    Comments
    2.1.2.4.3.15 Field [0]
    2.1.2.4.3.15.1 [0] Tree Diagram
    2.1.2.4.3.15.2 [0] properties
    PropertyValue
    Display name
    Id
    Type string
    Description
    Dependencies
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.3.16 Field externalLinks
    2.1.2.4.3.16.1 externalLinks Tree Diagram
    2.1.2.4.3.16.2 externalLinks Hierarchy
    Parent field: posts
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    emailstringfalse

    An email related to the post's content.

    +
    websitestringfalse

    Link for a website related to the post's content.

    +
    playStorestringfalse

    Link for a Play Store application related to the post's content.

    +
    appStorestringfalse

    Link for a AppStore application related to the post's content.

    +
    2.1.2.4.3.16.3 externalLinks properties
    PropertyValue
    Name externalLinks
    Technical name
    Id
    Type document
    Description
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.4.3.17 Field email
    2.1.2.4.3.17.1 email Tree Diagram
    2.1.2.4.3.17.2 email properties
    PropertyValue
    Name email
    Technical name
    Id
    Type string
    Description

    An email related to the post's content.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.3.18 Field website
    2.1.2.4.3.18.1 website Tree Diagram
    2.1.2.4.3.18.2 website properties
    PropertyValue
    Name website
    Technical name
    Id
    Type string
    Description

    Link for a website related to the post's content.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.3.19 Field playStore
    2.1.2.4.3.19.1 playStore Tree Diagram
    2.1.2.4.3.19.2 playStore properties
    PropertyValue
    Name playStore
    Technical name
    Id
    Type string
    Description

    Link for a Play Store application related to the post's content.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.3.20 Field appStore
    2.1.2.4.3.20.1 appStore Tree Diagram
    2.1.2.4.3.20.2 appStore properties
    PropertyValue
    Name appStore
    Technical name
    Id
    Type string
    Description

    Link for a AppStore application related to the post's content.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.4 posts JSON Schema
    {
         "$schema": "http://json-schema.org/draft-04/schema#",
         "type": "object",
         "title": "posts",
    @@ -809,7 +1209,7 @@
             "visibility",
             "likes"
         ]
    -}
    2.1.2.3.5 posts JSON data
    {
    +}
    2.1.2.4.5 posts JSON data
    {
         "_id": ObjectId("507f1f77bcf86cd799439011"),
         "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
         "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
    @@ -849,7 +1249,7 @@
             "playStore": "Lorem",
             "appStore": "Lorem"
         }
    -}
    2.1.2.3.6 posts Target Script
    use applicationDB;
    +}
    2.1.2.4.6 posts Target Script
    use applicationDB;
     
     db.createCollection( "posts",{
         "storageEngine": {
    @@ -1059,155 +1459,465 @@
         },
         "validationLevel": "off",
         "validationAction": "warn"
    -});
    2.1.2.4 Collection users
    2.1.2.4.1 users Tree Diagram
    XX
    users
    {_id}
    _id
    {dt}
    createdAt
    {dt}
    updatedAt
    {ABC}
    authId
    location
    ref:
    location (m)
    {ABC}
    about
    {ABC}
    photo
    [...]
    coordinates
    {ABC}
    type
    {ABC}
    country
    {ABC}
    city
    {ABC}
    neighborhood
    {ABC}
    address
    {Sub}
    [0]
    {Sub}
    [1]
    {Sub}
    [0]
    {Sub}
    [1]
    {123}
    [0]
    {123}
    [1]+
    {ABC}
    type
    {ABC}
    firstName
    {ABC}
    lastName
    {...}
    needs
    {...}
    objectives
    {...}
    urls
    {ABC}
    type
    {ABC}
    industry
    {_id}
    ownerId
    {ABC}
    name
    {...}
    needs
    {0/1}
    global
    {...}
    urls
    {ABC}
    language
    {ABC}
    email
    {ABC}
    phone
    {0/1}
    medicalHelp
    {0/1}
    otherHelp
    {0/1}
    volunteer
    {0/1}
    donate
    {0/1}
    shareInformation
    {ABC}
    facebook
    {ABC}
    linkedin
    {ABC}
    twitter
    {ABC}
    github
    {ABC}
    website
    {0/1}
    volunteers
    {0/1}
    donations
    {0/1}
    staff
    {0/1}
    other
    {ABC}
    linkedin
    {ABC}
    twitter
    {ABC}
    website
    {ABC}
    playstore
    {ABC}
    appstore
    users
    {_id}
    _id
    {dt}
    createdAt
    {dt}
    updatedAt
    {ABC}
    authId
    location
    ref:
    location (m)
    {ABC}
    about
    {ABC}
    photo
    [...]
    coordinates
    {ABC}
    type
    {ABC}
    country
    {ABC}
    city
    {ABC}
    neighborhood
    {ABC}
    address
    {Sub}
    [0]
    {Sub}
    [1]
    {Sub}
    [0]
    {Sub}
    [1]
    {123}
    [0]
    {123}
    [1]+
    {ABC}
    type
    {ABC}
    firstName
    {ABC}
    lastName
    {...}
    needs
    {...}
    objectives
    {...}
    urls
    {ABC}
    type
    {ABC}
    industry
    {_id}
    ownerId
    {ABC}
    name
    {...}
    needs
    {0/1}
    global
    {...}
    urls
    {ABC}
    language
    {ABC}
    email
    {ABC}
    phone
    {0/1}
    medicalHelp
    {0/1}
    otherHelp
    {0/1}
    volunteer
    {0/1}
    donate
    {0/1}
    shareInformation
    {ABC}
    facebook
    {ABC}
    linkedin
    {ABC}
    twitter
    {ABC}
    github
    {ABC}
    website
    {0/1}
    volunteers
    {0/1}
    donations
    {0/1}
    staff
    {0/1}
    other
    {ABC}
    linkedin
    {ABC}
    twitter
    {ABC}
    website
    {ABC}
    playstore
    {ABC}
    appstore
    2.1.2.4.2 users Properties
    PropertyValue
    Collection nameusers
    Technical name
    Id
    Description

    Collection that holds all the data on system's users.

    +});
    2.1.2.5 Collection thread
    2.1.2.5.1 thread Tree Diagram
    2.1.2.5.2 thread Properties
    PropertyValue
    Collection namethread
    Technical name
    Id
    Description

    ObjectId that serves as primary key for the message thread.

    +
    DatabaseapplicationDB
    Cappedfalse
    Size
    Max
    Storage engineWiredTiger
    Config String
    Validation levelOff
    Validation actionWarn
    Additional propertiesfalse
    Comments
    2.1.2.5.3 thread Fields
    FieldTypeReqKeyDescriptionComments
    _idobjectIdtrue
    createdAtdatetrue

    Timestamp with the threads's creation date

    +
    updatedAtdatetrue

    Timestamp with the thread's update date

    +
    statusstringtrue

    Curerent thread status, used to define archives, soft deletes and other conversation status. The statuses are:

    +
      +
    • pending: if the user didn't accept the message request yet
    • +
    • blocked: if the one of the user's blocked the other
    • +
    • accepted: message request was accepted and users exchange messages
    • +
    • archived: user archived the message thread
    • +
    • deleted: user deleted the conversation
    • +
    +
    participantsarraytrue

    Array of user reference's, containing the participants of the message thread.

    +

    It is modelled as an array to allow expansion to group chats in the future.

    +
    [0]documenttrue
    idobjectIdtrue

    Foreign key to the user who created the post.

    +
    namestringtrue

    User's name

    +
    typestringtrue

    User's type

    +
    locationdocumenttrue

    Location document according to the norms of a GeoJSON Object. +The fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.

    +
    coordinatesarraytrue

    Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

    +
    [0]numericfalse

    Location longitude

    +
    [1]numericfalse

    Location latitude

    +
    typestringtrue

    Type of the GeoJSON Object. +Please refer to the official documentation for more information.

    +

    In our case, the value will always be of the type "Point".

    +
    countrystringfalse

    String holding the country's name.

    +
    citystringfalse

    String holding the city's name.

    +
    neighborhoodstringfalse

    String holding the neighborhood's name.

    +
    addressstringfalse

    String holding the address (street, number and other details).

    +
    newMessagesbooleantrue

    Flag to indicate whether there are new messages since last time the user accessed the thread.

    +
    lastAccessdatetrue

    Timestamp with the last time the user accessed the message thread.

    +
    2.1.2.5.3.1 Field _id
    2.1.2.5.3.1.1 _id Tree Diagram
    2.1.2.5.3.1.2 _id properties
    PropertyValue
    Name _id
    Technical name
    Id
    Type objectId
    Description
    Dependencies
    Required true
    Primary key true
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.5.3.2 Field createdAt
    2.1.2.5.3.2.1 createdAt Tree Diagram
    2.1.2.5.3.2.2 createdAt properties
    PropertyValue
    Name createdAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the threads's creation date

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.5.3.3 Field updatedAt
    2.1.2.5.3.3.1 updatedAt Tree Diagram
    2.1.2.5.3.3.2 updatedAt properties
    PropertyValue
    Name updatedAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the thread's update date

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.5.3.4 Field status
    2.1.2.5.3.4.1 status Tree Diagram
    2.1.2.5.3.4.2 status properties
    PropertyValue
    Name status
    Technical name
    Id
    Type string
    Description

    Curerent thread status, used to define archives, soft deletes and other conversation status. The statuses are:

    +
      +
    • pending: if the user didn't accept the message request yet
    • +
    • blocked: if the one of the user's blocked the other
    • +
    • accepted: message request was accepted and users exchange messages
    • +
    • archived: user archived the message thread
    • +
    • deleted: user deleted the conversation
    • +
    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default pending
    Min length
    Max length
    Pattern
    Format
    Enum deleted,blocked,accepted,pending,archived
    Sample
    Comments
    2.1.2.5.3.5 Field participants
    2.1.2.5.3.5.1 participants Tree Diagram
    2.1.2.5.3.5.2 participants Hierarchy
    Parent field: thread
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    [0]documenttrue
    2.1.2.5.3.5.3 participants properties
    PropertyValue
    Name participants
    Technical name
    Id
    Type array
    Description

    Array of user reference's, containing the participants of the message thread.

    +

    It is modelled as an array to allow expansion to group chats in the future.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Min items 2
    Max items
    Unique items false
    Additional items true
    Comments
    2.1.2.5.3.6 Field [0]
    2.1.2.5.3.6.1 [0] Tree Diagram
    2.1.2.5.3.6.2 [0] Hierarchy
    Parent field: participants
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    idobjectIdtruefk

    Foreign key to the user who created the post.

    +
    namestringtrue

    User's name

    +
    typestringtrue

    User's type

    +
    locationreferencetrue
    newMessagesbooleantrue

    Flag to indicate whether there are new messages since last time the user accessed the thread.

    +
    lastAccessdatetrue

    Timestamp with the last time the user accessed the message thread.

    +
    2.1.2.5.3.6.3 [0] properties
    PropertyValue
    Id
    Type document
    Description
    Dependencies
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.5.3.7 Field id
    2.1.2.5.3.7.1 id Tree Diagram
    2.1.2.5.3.7.2 id properties
    PropertyValue
    Name id
    Technical name
    Id
    Type objectId
    Description

    Foreign key to the user who created the post.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection users
    Foreign field _id
    Relationship type Foreign Key
    Default
    Sample
    Comments
    2.1.2.5.3.8 Field name
    2.1.2.5.3.8.1 name Tree Diagram
    2.1.2.5.3.8.2 name properties
    PropertyValue
    Name name
    Technical name
    Id
    Type string
    Description

    User's name

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.5.3.9 Field type
    2.1.2.5.3.9.1 type Tree Diagram
    2.1.2.5.3.9.2 type properties
    PropertyValue
    Name type
    Technical name
    Id
    Type string
    Description

    User's type

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.5.3.10 Field location
    2.1.2.5.3.10.1 location Tree Diagram
    2.1.2.5.3.10.2 location properties
    PropertyValue
    Name location
    Technical name
    $ref#model/definitions/location
    Reference type model
    Reference description

    User's location

    +
    2.1.2.5.3.11 Field newMessages
    2.1.2.5.3.11.1 newMessages Tree Diagram
    2.1.2.5.3.11.2 newMessages properties
    PropertyValue
    Name newMessages
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate whether there are new messages since last time the user accessed the thread.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample
    Comments
    2.1.2.5.3.12 Field lastAccess
    2.1.2.5.3.12.1 lastAccess Tree Diagram
    2.1.2.5.3.12.2 lastAccess properties
    PropertyValue
    Name lastAccess
    Technical name
    Id
    Type date
    Description

    Timestamp with the last time the user accessed the message thread.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.5.4 thread JSON Schema
    {
    +    "$schema": "http://json-schema.org/draft-04/schema#",
    +    "type": "object",
    +    "title": "thread",
    +    "description": "ObjectId that serves as primary key for the message thread.",
    +    "additionalProperties": false,
    +    "properties": {
    +        "_id": {
    +            "type": "string",
    +            "pattern": "^[a-fA-F0-9]{24}$"
    +        },
    +        "createdAt": {
    +            "type": "string",
    +            "description": "Timestamp with the threads's creation date",
    +            "format": "date-time"
    +        },
    +        "updatedAt": {
    +            "type": "string",
    +            "description": "Timestamp with the thread's update date",
    +            "format": "date-time"
    +        },
    +        "status": {
    +            "type": "string",
    +            "description": "Curerent thread status, used to define archives, soft deletes and other conversation status. The statuses are:\n\n* **pending**: if the user didn't accept the message request yet\n* **blocked**: if the one of the user's blocked the other\n* **accepted**: message request was accepted and users exchange messages\n* **archived**: user archived the message thread\n* **deleted**: user deleted the conversation",
    +            "default": "pending",
    +            "enum": [
    +                "deleted",
    +                "blocked",
    +                "accepted",
    +                "pending",
    +                "archived"
    +            ]
    +        },
    +        "participants": {
    +            "type": "array",
    +            "description": "Array of user reference's, containing the participants of the message thread.\n\nIt is modelled as an array to allow expansion to group chats in the future.",
    +            "additionalItems": true,
    +            "minItems": 2,
    +            "uniqueItems": false,
    +            "items": {
    +                "type": "object",
    +                "properties": {
    +                    "id": {
    +                        "type": "string",
    +                        "description": "Foreign key to the user who created the post.",
    +                        "pattern": "^[a-fA-F0-9]{24}$"
    +                    },
    +                    "name": {
    +                        "type": "string",
    +                        "description": "User's name"
    +                    },
    +                    "type": {
    +                        "type": "string",
    +                        "description": "User's type"
    +                    },
    +                    "location": {
    +                        "$ref": "#model/definitions/location"
    +                    },
    +                    "newMessages": {
    +                        "type": "boolean",
    +                        "description": "Flag to indicate whether there are new messages since last time the user accessed the thread.",
    +                        "default": false
    +                    },
    +                    "lastAccess": {
    +                        "type": "string",
    +                        "description": "Timestamp with the last time the user accessed the message thread.",
    +                        "format": "date-time"
    +                    }
    +                },
    +                "additionalProperties": false,
    +                "required": [
    +                    "id",
    +                    "name",
    +                    "type",
    +                    "location",
    +                    "newMessages",
    +                    "lastAccess"
    +                ]
    +            }
    +        }
    +    },
    +    "required": [
    +        "_id",
    +        "createdAt",
    +        "updatedAt",
    +        "status",
    +        "participants"
    +    ]
    +}
    2.1.2.5.5 thread JSON data
    {
    +    "_id": ObjectId("507f1f77bcf86cd799439011"),
    +    "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
    +    "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
    +    "status": "pending",
    +    "participants": [
    +        {
    +            "id": ObjectId("507f1f77bcf86cd799439011"),
    +            "name": "Lorem",
    +            "type": "Lorem",
    +            "location": {
    +                "coordinates": [
    +                    35.26,
    +                    -32.83
    +                ],
    +                "type": "Point",
    +                "country": "Lorem",
    +                "city": "Lorem",
    +                "neighborhood": "Lorem",
    +                "address": "Lorem"
    +            },
    +            "newMessages": false,
    +            "lastAccess": ISODate("2016-04-08T15:06:21.595Z")
    +        }
    +    ]
    +}
    2.1.2.5.6 thread Target Script
    use applicationDB;
    +
    +db.createCollection( "thread",{
    +    "storageEngine": {
    +        "wiredTiger": {}
    +    },
    +    "capped": false,
    +    "validator": {
    +        "$jsonSchema": {
    +            "bsonType": "object",
    +            "title": "thread",
    +            "description": "ObjectId that serves as primary key for the message thread.",
    +            "additionalProperties": false,
    +            "properties": {
    +                "_id": {
    +                    "bsonType": "objectId"
    +                },
    +                "createdAt": {
    +                    "bsonType": "date",
    +                    "description": "Timestamp with the threads's creation date"
    +                },
    +                "updatedAt": {
    +                    "bsonType": "date",
    +                    "description": "Timestamp with the thread's update date"
    +                },
    +                "status": {
    +                    "bsonType": "string",
    +                    "description": "Curerent thread status, used to define archives, soft deletes and other conversation status. The statuses are:\n\n* **pending**: if the user didn't accept the message request yet\n* **blocked**: if the one of the user's blocked the other\n* **accepted**: message request was accepted and users exchange messages\n* **archived**: user archived the message thread\n* **deleted**: user deleted the conversation",
    +                    "enum": [
    +                        "deleted",
    +                        "blocked",
    +                        "accepted",
    +                        "pending",
    +                        "archived"
    +                    ]
    +                },
    +                "participants": {
    +                    "bsonType": "array",
    +                    "description": "Array of user reference's, containing the participants of the message thread.\n\nIt is modelled as an array to allow expansion to group chats in the future.",
    +                    "additionalItems": true,
    +                    "minItems": 2,
    +                    "uniqueItems": false,
    +                    "items": {
    +                        "bsonType": "object",
    +                        "properties": {
    +                            "id": {
    +                                "bsonType": "objectId",
    +                                "description": "Foreign key to the user who created the post."
    +                            },
    +                            "name": {
    +                                "bsonType": "string",
    +                                "description": "User's name"
    +                            },
    +                            "type": {
    +                                "bsonType": "string",
    +                                "description": "User's type"
    +                            },
    +                            "location": {
    +                                "bsonType": "object",
    +                                "description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.",
    +                                "properties": {
    +                                    "coordinates": {
    +                                        "bsonType": "array",
    +                                        "description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.",
    +                                        "additionalItems": true,
    +                                        "minItems": 2,
    +                                        "maxItems": 2,
    +                                        "uniqueItems": false,
    +                                        "items": [
    +                                            {
    +                                                "bsonType": "number",
    +                                                "description": "Location longitude\n",
    +                                                "minimum": -180,
    +                                                "maximum": 180
    +                                            },
    +                                            {
    +                                                "bsonType": "number",
    +                                                "description": "Location latitude\n",
    +                                                "minimum": -90,
    +                                                "maximum": 90
    +                                            }
    +                                        ]
    +                                    },
    +                                    "type": {
    +                                        "bsonType": "string",
    +                                        "description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**",
    +                                        "enum": [
    +                                            "Point"
    +                                        ]
    +                                    },
    +                                    "country": {
    +                                        "bsonType": "string",
    +                                        "description": "String holding the country's name.\n"
    +                                    },
    +                                    "city": {
    +                                        "bsonType": "string",
    +                                        "description": "String holding the city's name."
    +                                    },
    +                                    "neighborhood": {
    +                                        "bsonType": "string",
    +                                        "description": "String holding the neighborhood's name."
    +                                    },
    +                                    "address": {
    +                                        "bsonType": "string",
    +                                        "description": "String holding the address (street, number and other details)."
    +                                    }
    +                                },
    +                                "additionalProperties": false,
    +                                "required": [
    +                                    "coordinates",
    +                                    "type"
    +                                ]
    +                            },
    +                            "newMessages": {
    +                                "bsonType": "bool",
    +                                "description": "Flag to indicate whether there are new messages since last time the user accessed the thread."
    +                            },
    +                            "lastAccess": {
    +                                "bsonType": "date",
    +                                "description": "Timestamp with the last time the user accessed the message thread."
    +                            }
    +                        },
    +                        "additionalProperties": false,
    +                        "required": [
    +                            "id",
    +                            "name",
    +                            "type",
    +                            "newMessages",
    +                            "lastAccess"
    +                        ]
    +                    }
    +                }
    +            },
    +            "required": [
    +                "_id",
    +                "createdAt",
    +                "updatedAt",
    +                "status",
    +                "participants"
    +            ]
    +        }
    +    },
    +    "validationLevel": "off",
    +    "validationAction": "warn"
    +});
    2.1.2.6 Collection users
    2.1.2.6.1 users Tree Diagram
    2.1.2.6.2 users Properties
    PropertyValue
    Collection nameusers
    Technical name
    Id
    Description

    Collection that holds all the data on system's users.

    The users can be of two types: (1) Individual, representing a private user account; and (2) Organization, representing an organization of various types.

    The field 'type' is used to differentiate between the two subschemas, with 'individual' representing private user accounts and "Community", "Government", "Health care provider", "Non-profit", "Other", "R&D", "Startup", "Traditional Company" and "University".

    -
    DatabaseapplicationDB
    Cappedfalse
    Size
    Max
    Storage engineWiredTiger
    Config String
    Validation levelOff
    Validation actionWarn
    Additional propertiestrue
    Comments
    2.1.2.4.3 users Fields
    FieldTypeReqKeyDescriptionComments
    _idobjectIdtrue

    Automatically generated _it as primary key.

    -
    createdAtdatetrue

    Timestamp with the user's creation date

    +
    DatabaseapplicationDB
    Cappedfalse
    Size
    Max
    Storage engineWiredTiger
    Config String
    Validation levelOff
    Validation actionWarn
    Additional propertiestrue
    Comments
    2.1.2.6.3 users Fields
    FieldTypeReqKeyDescriptionComments
    _idobjectIdtrue

    Automatically generated _it as primary key.

    +
    createdAtdatetrue

    Timestamp with the user's creation date

    Thu Apr 16 2020 04:59:24 GMT-0300 (Horário Padrão de Brasília): changed the name to registeredAt

    -
    updatedAtdatetrue

    Timestamp indicating last update on the database.

    -
    authIdstringtrue

    String holding the authentication service id (Auth0).

    +
    updatedAtdatetrue

    Timestamp indicating last update on the database.

    +
    authIdstringtrue

    String holding the authentication service id (Auth0).

    This field is a foreign key to the user in the Auth0 database, connecting through the user_id field.

    -
    locationdocumentfalse

    Location document according to the norms of a GeoJSON Object. +

    locationdocumentfalse

    Location document according to the norms of a GeoJSON Object. The fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.

    -
    coordinatesarraytrue

    Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

    -
    [0]numericfalse

    Location longitude

    -
    [1]numericfalse

    Location latitude

    -
    typestringtrue

    Type of the GeoJSON Object. +

    coordinatesarraytrue

    Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

    +
    [0]numericfalse

    Location longitude

    +
    [1]numericfalse

    Location latitude

    +
    typestringtrue

    Type of the GeoJSON Object. Please refer to the official documentation for more information.

    In our case, the value will always be of the type "Point".

    -
    countrystringfalse

    String holding the country's name.

    -
    citystringfalse

    String holding the city's name.

    -
    neighborhoodstringfalse

    String holding the neighborhood's name.

    -
    addressstringfalse

    String holding the address (street, number and other details).

    -
    aboutstringfalse

    Small self-introduction, limited to 100 char

    -
    photourifalse

    URI with the location of the profile's photo.

    -
    oneOfchoicefalse
    subschemasubschemafalse

    Subschema representing a individual account.

    -
    typestringtrue
    firstNamestringtrue

    The first name of the user

    -
    lastNamestringfalse

    The last name of the user. Optional field.

    -
    needsdocumenttrue

    User's need in the app, representing what kind of help he/she needs

    -
    medicalHelpbooleantrue

    Flag to indicate wheter the user needs medical help. +

    countrystringfalse

    String holding the country's name.

    +
    citystringfalse

    String holding the city's name.

    +
    neighborhoodstringfalse

    String holding the neighborhood's name.

    +
    addressstringfalse

    String holding the address (street, number and other details).

    +
    aboutstringfalse

    Small self-introduction, limited to 100 char

    +
    photourifalse

    URI with the location of the profile's photo.

    +
    oneOfchoicefalse
    [0] subschemasubschemafalse

    Subschema representing a individual account.

    +
    typestringtrue
    firstNamestringtrue

    The first name of the user

    +
    lastNamestringfalse

    The last name of the user. Optional field.

    +
    needsdocumenttrue

    User's need in the app, representing what kind of help he/she needs

    +
    medicalHelpbooleantrue

    Flag to indicate wheter the user needs medical help. Marking this indicates he shows symptoms of COVID-19.

    -
    otherHelpbooleantrue

    Flag to indicate wheter the user needs non-medical help, such as getting groceries, medice and etc..

    -
    objectivesdocumentfalse

    Document with what are the objectives of the user through the application, such as donating, volunteering or sharing information.

    -
    volunteerbooleantrue

    Flag to indicate wheter the user wants to volunteer for iniciatives through the app.

    -
    donatebooleantrue

    Flag to indicate wheter the user wants to donate for iniciatives through the app.

    -
    shareInformationbooleantrue

    Flag to indicate wheter the user wants to share information through the app.

    -
    urlsdocumentfalse

    Document holding the user urls to external websites and social networks

    -
    facebookurifalse

    URL to user's Facebook page.

    -
    linkedinurifalse

    URL to user's Linkedin page.

    -
    twitterurifalse

    URL to user's Twitter page.

    -
    githuburifalse

    URL to user's Github page.

    -
    websiteurifalse

    URL to user's personal website.

    -
    subschemasubschemafalse

    Subschema representing an organization (colective) account.

    -
    typestringtrue

    The type of the organization. Can be: Community, Government, Health care provider, Non-profit, Other, R&D, Startup, Traditional Company and University. All names are store in lowercase only.

    -
    industrystringtrue

    Industry from which the organization participates. Plan is for this values to be scraped from linkedin industries.

    -
    ownerIdobjectIdtrue

    _id of the user who owns the organization.

    -
    namestringtrue

    Organization's name.

    -
    needsdocumenttrue

    Document with what are the objectives of the organization through the application, such as finding volunteers, staff, investors and donors.

    -
    volunteersbooleantrue

    Flag to indicate wheter the organization is seeking volunteers through the app.

    -
    donationsbooleantrue

    Flag to indicate wheter the organization is seeking donations through the app.

    -
    staffbooleantrue

    Flag to indicate wheter the organization is seeking staff through the app.

    -
    otherbooleantrue

    Flag to indicate wheter the organization is seeking other needs through the app.

    -
    globalbooleanfalse

    Flag to indicate wheter this organization is global.

    -
    urlsdocumentfalse

    Document holding external urls and refs to the organization such as social media profiles.

    -
    linkedinurifalse

    URL to organization's Linkedin page.

    -
    twitterurifalse

    URL to organization's Twitter page.

    -
    websiteurifalse

    URL to organization's website.

    -
    playstoreurifalse

    URL to organization's page at Google Play Store.

    -
    appstoreurifalse

    URL to organization's page at Apple App Store

    -
    languagestringfalse

    Field to inidicate the language used by the organization.

    -
    anyOfchoicefalse
    subschemasubschemafalse

    Case where the user comes from social networks with a registration that uses email. In this case, the email field is required. This case covers the great majority of currently supported social network authentications.

    -
    emailemailtrue

    User's email validated by a regex pattern.

    -
    subschemasubschemafalse

    Case where the user comes from social networks with a registration that allows the use of only the phone. In this case, the phone field is required, and the email isn't.

    +
    otherHelpbooleantrue

    Flag to indicate wheter the user needs non-medical help, such as getting groceries, medice and etc..

    +
    objectivesdocumentfalse

    Document with what are the objectives of the user through the application, such as donating, volunteering or sharing information.

    +
    volunteerbooleantrue

    Flag to indicate wheter the user wants to volunteer for iniciatives through the app.

    +
    donatebooleantrue

    Flag to indicate wheter the user wants to donate for iniciatives through the app.

    +
    shareInformationbooleantrue

    Flag to indicate wheter the user wants to share information through the app.

    +
    urlsdocumentfalse

    Document holding the user urls to external websites and social networks

    +
    facebookurifalse

    URL to user's Facebook page.

    +
    linkedinurifalse

    URL to user's Linkedin page.

    +
    twitterurifalse

    URL to user's Twitter page.

    +
    githuburifalse

    URL to user's Github page.

    +
    websiteurifalse

    URL to user's personal website.

    +
    [1] subschemasubschemafalse

    Subschema representing an organization (colective) account.

    +
    typestringtrue

    The type of the organization. Can be: Community, Government, Health care provider, Non-profit, Other, R&D, Startup, Traditional Company and University. All names are store in lowercase only.

    +
    industrystringtrue

    Industry from which the organization participates. Plan is for this values to be scraped from linkedin industries.

    +
    ownerIdobjectIdtrue

    _id of the user who owns the organization.

    +
    namestringtrue

    Organization's name.

    +
    needsdocumenttrue

    Document with what are the objectives of the organization through the application, such as finding volunteers, staff, investors and donors.

    +
    volunteersbooleantrue

    Flag to indicate wheter the organization is seeking volunteers through the app.

    +
    donationsbooleantrue

    Flag to indicate wheter the organization is seeking donations through the app.

    +
    staffbooleantrue

    Flag to indicate wheter the organization is seeking staff through the app.

    +
    otherbooleantrue

    Flag to indicate wheter the organization is seeking other needs through the app.

    +
    globalbooleanfalse

    Flag to indicate wheter this organization is global.

    +
    urlsdocumentfalse

    Document holding external urls and refs to the organization such as social media profiles.

    +
    linkedinurifalse

    URL to organization's Linkedin page.

    +
    twitterurifalse

    URL to organization's Twitter page.

    +
    websiteurifalse

    URL to organization's website.

    +
    playstoreurifalse

    URL to organization's page at Google Play Store.

    +
    appstoreurifalse

    URL to organization's page at Apple App Store

    +
    languagestringfalse

    Field to inidicate the language used by the organization.

    +
    anyOfchoicefalse
    [0] subschemasubschemafalse

    Case where the user comes from social networks with a registration that uses email. In this case, the email field is required. This case covers the great majority of currently supported social network authentications.

    +
    emailemailtrue

    User's email validated by a regex pattern.

    +
    [1] subschemasubschemafalse

    Case where the user comes from social networks with a registration that allows the use of only the phone. In this case, the phone field is required, and the email isn't.

    An example of ocial network that falls into this case is Twitter.

    -
    phonestringtrue
    2.1.2.4.3.1 Field createdAt
    2.1.2.4.3.1.1 createdAt Tree Diagram
    {dt}
    createdAt
    {dt}
    createdAt
    2.1.2.4.3.1.2 createdAt properties
    PropertyValue
    Name createdAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the user's creation date

    +
    phonestringtrue
    2.1.2.6.3.1 Field createdAt
    2.1.2.6.3.1.1 createdAt Tree Diagram
    2.1.2.6.3.1.2 createdAt properties
    PropertyValue
    Name createdAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the user's creation date

    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments

    Thu Apr 16 2020 04:59:24 GMT-0300 (Horário Padrão de Brasília): changed the name to registeredAt

    -
    2.1.2.4.3.2 Field _id
    2.1.2.4.3.2.1 _id Tree Diagram
    {_id}
    _id
    {_id}
    _id
    2.1.2.4.3.2.2 _id properties
    PropertyValue
    Name _id
    Technical name
    Id
    Type objectId
    Description

    Automatically generated _it as primary key.

    -
    Dependencies
    Required true
    Primary key true
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.4.3.3 Field updatedAt
    2.1.2.4.3.3.1 updatedAt Tree Diagram
    {dt}
    updatedAt
    {dt}
    updatedAt
    2.1.2.4.3.3.2 updatedAt properties
    PropertyValue
    Name updatedAt
    Technical name
    Id
    Type date
    Description

    Timestamp indicating last update on the database.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.4.3.4 Field authId
    2.1.2.4.3.4.1 authId Tree Diagram
    {ABC}
    authId
    {ABC}
    authId
    2.1.2.4.3.4.2 authId properties
    PropertyValue
    Name authId
    Technical name
    Id
    Type string
    Description

    String holding the authentication service id (Auth0).

    +
    2.1.2.6.3.2 Field _id
    2.1.2.6.3.2.1 _id Tree Diagram
    2.1.2.6.3.2.2 _id properties
    PropertyValue
    Name _id
    Technical name
    Id
    Type objectId
    Description

    Automatically generated _it as primary key.

    +
    Dependencies
    Required true
    Primary key true
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.6.3.3 Field updatedAt
    2.1.2.6.3.3.1 updatedAt Tree Diagram
    2.1.2.6.3.3.2 updatedAt properties
    PropertyValue
    Name updatedAt
    Technical name
    Id
    Type date
    Description

    Timestamp indicating last update on the database.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.6.3.4 Field authId
    2.1.2.6.3.4.1 authId Tree Diagram
    2.1.2.6.3.4.2 authId properties
    PropertyValue
    Name authId
    Technical name
    Id
    Type string
    Description

    String holding the authentication service id (Auth0).

    This field is a foreign key to the user in the Auth0 database, connecting through the user_id field.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.3.5 Field location
    2.1.2.4.3.5.1 location Tree Diagram
    location
    ref:
    location (m)
    location
    ref:
    location (m)
    2.1.2.4.3.5.2 location properties
    PropertyValue
    Name location
    $ref#model/definitions/location
    Reference type model
    2.1.2.4.3.6 Field about
    2.1.2.4.3.6.1 about Tree Diagram
    {ABC}
    about
    {ABC}
    about
    2.1.2.4.3.6.2 about properties
    PropertyValue
    Name about
    Technical name
    Id
    Type string
    Description

    Small self-introduction, limited to 100 char

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.3.7 Field photo
    2.1.2.4.3.7.1 photo Tree Diagram
    {ABC}
    photo
    {ABC}
    photo
    2.1.2.4.3.7.2 photo properties
    PropertyValue
    Name photo
    Technical name
    Id
    Type string
    Description

    URI with the location of the profile's photo.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample
    Comments
    2.1.2.4.3.8 Field oneOf
    2.1.2.4.3.8.1 oneOf Tree Diagram
    X
    {Sub}
    [0]
    {Sub}
    [1]
    {Sub}
    [0]
    {Sub}
    [1]
    2.1.2.4.3.8.2 oneOf Hierarchy
    Parent field: coordinates
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    subschemasubschemafalse

    Subschema representing a individual account.

    -
    subschemasubschemafalse

    Subschema representing an organization (colective) account.

    -
    2.1.2.4.3.8.3 oneOf properties
    PropertyValue
    Choice oneOf
    2.1.2.4.3.9 Field [1]
    2.1.2.4.3.9.1 [1] Tree Diagram
    {Sub}
    [subschema]
    {ABC}
    type
    {ABC}
    firstName
    {ABC}
    lastName
    {...}
    needs
    {...}
    objectives
    {...}
    urls
    {Sub}
    [subschema]
    {ABC}
    type
    {ABC}
    firstName
    {ABC}
    lastName
    {...}
    needs
    {...}
    objectives
    {...}
    urls
    2.1.2.4.3.9.2 [1] Hierarchy
    Parent field: location
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    typestringtrue
    firstNamestringtrue

    The first name of the user

    -
    lastNamestringfalse

    The last name of the user. Optional field.

    -
    needsdocumenttrue

    User's need in the app, representing what kind of help he/she needs

    -
    objectivesdocumentfalse

    Document with what are the objectives of the user through the application, such as donating, volunteering or sharing information.

    -
    urlsdocumentfalse

    Document holding the user urls to external websites and social networks

    -
    2.1.2.4.3.9.3 [1] properties
    PropertyValue
    Id individual
    Description

    Subschema representing a individual account.

    -
    Required
    Min Properties
    Max Properties
    Additional properties true
    Comments
    2.1.2.4.3.10 Field type
    2.1.2.4.3.10.1 type Tree Diagram
    {ABC}
    type
    {ABC}
    type
    2.1.2.4.3.10.2 type properties
    PropertyValue
    Name type
    Technical name
    Id
    Type string
    Description
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum individual
    Sample
    Comments
    2.1.2.4.3.11 Field firstName
    2.1.2.4.3.11.1 firstName Tree Diagram
    {ABC}
    firstName
    {ABC}
    firstName
    2.1.2.4.3.11.2 firstName properties
    PropertyValue
    Name firstName
    Technical name
    Id
    Type string
    Description

    The first name of the user

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.3.12 Field lastName
    2.1.2.4.3.12.1 lastName Tree Diagram
    {ABC}
    lastName
    {ABC}
    lastName
    2.1.2.4.3.12.2 lastName properties
    PropertyValue
    Name lastName
    Technical name
    Id
    Type string
    Description

    The last name of the user. Optional field.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.3.13 Field needs
    2.1.2.4.3.13.1 needs Tree Diagram
    {...}
    needs
    {0/1}
    medicalHelp
    {0/1}
    otherHelp
    {...}
    needs
    {0/1}
    medicalHelp
    {0/1}
    otherHelp
    2.1.2.4.3.13.2 needs Hierarchy
    Parent field: location
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    medicalHelpbooleantrue

    Flag to indicate wheter the user needs medical help. +

    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.6.3.5 Field location
    2.1.2.6.3.5.1 location Tree Diagram
    2.1.2.6.3.5.2 location properties
    PropertyValue
    Name location
    Technical name
    $ref#model/definitions/location
    Reference type model
    Reference description
    2.1.2.6.3.6 Field about
    2.1.2.6.3.6.1 about Tree Diagram
    2.1.2.6.3.6.2 about properties
    PropertyValue
    Name about
    Technical name
    Id
    Type string
    Description

    Small self-introduction, limited to 100 char

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.6.3.7 Field photo
    2.1.2.6.3.7.1 photo Tree Diagram
    2.1.2.6.3.7.2 photo properties
    PropertyValue
    Name photo
    Technical name
    Id
    Type string
    Description

    URI with the location of the profile's photo.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample
    Comments
    2.1.2.6.3.8 Field oneOf
    2.1.2.6.3.8.1 oneOf Tree Diagram
    2.1.2.6.3.8.2 oneOf Hierarchy
    Parent field: users
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    subschemasubschemafalse

    Subschema representing a individual account.

    +
    subschemasubschemafalse

    Subschema representing an organization (colective) account.

    +
    2.1.2.6.3.8.3 oneOf properties
    PropertyValue
    Choice oneOf
    Description
    Comments
    2.1.2.6.3.9 Field [0] subschema
    2.1.2.6.3.9.1 [0] subschema Tree Diagram
    2.1.2.6.3.9.2 [0] subschema Hierarchy
    Parent field: oneOf
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    typestringtrue
    firstNamestringtrue

    The first name of the user

    +
    lastNamestringfalse

    The last name of the user. Optional field.

    +
    needsdocumenttrue

    User's need in the app, representing what kind of help he/she needs

    +
    objectivesdocumentfalse

    Document with what are the objectives of the user through the application, such as donating, volunteering or sharing information.

    +
    urlsdocumentfalse

    Document holding the user urls to external websites and social networks

    +
    2.1.2.6.3.9.3 [0] subschema properties
    PropertyValue
    Display name subschema
    Id individual
    Description

    Subschema representing a individual account.

    +
    Required
    Min Properties
    Max Properties
    Additional properties true
    Comments
    2.1.2.6.3.10 Field type
    2.1.2.6.3.10.1 type Tree Diagram
    2.1.2.6.3.10.2 type properties
    PropertyValue
    Name type
    Technical name
    Id
    Type string
    Description
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum individual
    Sample
    Comments
    2.1.2.6.3.11 Field firstName
    2.1.2.6.3.11.1 firstName Tree Diagram
    2.1.2.6.3.11.2 firstName properties
    PropertyValue
    Name firstName
    Technical name
    Id
    Type string
    Description

    The first name of the user

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.6.3.12 Field lastName
    2.1.2.6.3.12.1 lastName Tree Diagram
    2.1.2.6.3.12.2 lastName properties
    PropertyValue
    Name lastName
    Technical name
    Id
    Type string
    Description

    The last name of the user. Optional field.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.6.3.13 Field needs
    2.1.2.6.3.13.1 needs Tree Diagram
    2.1.2.6.3.13.2 needs Hierarchy
    Parent field: [0] subschema
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    medicalHelpbooleantrue

    Flag to indicate wheter the user needs medical help. Marking this indicates he shows symptoms of COVID-19.

    -
    otherHelpbooleantrue

    Flag to indicate wheter the user needs non-medical help, such as getting groceries, medice and etc..

    -
    2.1.2.4.3.13.3 needs properties
    PropertyValue
    Name needs
    Technical name
    Id
    Type document
    Description

    User's need in the app, representing what kind of help he/she needs

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.4.3.14 Field medicalHelp
    2.1.2.4.3.14.1 medicalHelp Tree Diagram
    {0/1}
    medicalHelp
    {0/1}
    medicalHelp
    2.1.2.4.3.14.2 medicalHelp properties
    PropertyValue
    Name medicalHelp
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the user needs medical help. +

    otherHelpbooleantrue

    Flag to indicate wheter the user needs non-medical help, such as getting groceries, medice and etc..

    +
    2.1.2.6.3.13.3 needs properties
    PropertyValue
    Name needs
    Technical name
    Id
    Type document
    Description

    User's need in the app, representing what kind of help he/she needs

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.6.3.14 Field medicalHelp
    2.1.2.6.3.14.1 medicalHelp Tree Diagram
    2.1.2.6.3.14.2 medicalHelp properties
    PropertyValue
    Name medicalHelp
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the user needs medical help. Marking this indicates he shows symptoms of COVID-19.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.4.3.15 Field otherHelp
    2.1.2.4.3.15.1 otherHelp Tree Diagram
    {0/1}
    otherHelp
    {0/1}
    otherHelp
    2.1.2.4.3.15.2 otherHelp properties
    PropertyValue
    Name otherHelp
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the user needs non-medical help, such as getting groceries, medice and etc..

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.4.3.16 Field objectives
    2.1.2.4.3.16.1 objectives Tree Diagram
    {...}
    objectives
    {0/1}
    volunteer
    {0/1}
    donate
    {0/1}
    shareInformation
    {...}
    objectives
    {0/1}
    volunteer
    {0/1}
    donate
    {0/1}
    shareInformation
    2.1.2.4.3.16.2 objectives Hierarchy
    Parent field: users
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    volunteerbooleantrue

    Flag to indicate wheter the user wants to volunteer for iniciatives through the app.

    -
    donatebooleantrue

    Flag to indicate wheter the user wants to donate for iniciatives through the app.

    -
    shareInformationbooleantrue

    Flag to indicate wheter the user wants to share information through the app.

    -
    2.1.2.4.3.16.3 objectives properties
    PropertyValue
    Name objectives
    Technical name
    Id
    Type document
    Description

    Document with what are the objectives of the user through the application, such as donating, volunteering or sharing information.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.4.3.17 Field volunteer
    2.1.2.4.3.17.1 volunteer Tree Diagram
    {0/1}
    volunteer
    {0/1}
    volunteer
    2.1.2.4.3.17.2 volunteer properties
    PropertyValue
    Name volunteer
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the user wants to volunteer for iniciatives through the app.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.4.3.18 Field donate
    2.1.2.4.3.18.1 donate Tree Diagram
    {0/1}
    donate
    {0/1}
    donate
    2.1.2.4.3.18.2 donate properties
    PropertyValue
    Name donate
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the user wants to donate for iniciatives through the app.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.4.3.19 Field shareInformation
    2.1.2.4.3.19.1 shareInformation Tree Diagram
    {0/1}
    shareInformation
    {0/1}
    shareInformation
    2.1.2.4.3.19.2 shareInformation properties
    PropertyValue
    Name shareInformation
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the user wants to share information through the app.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default true
    Sample true
    Comments
    2.1.2.4.3.20 Field urls
    2.1.2.4.3.20.1 urls Tree Diagram
    {...}
    urls
    {ABC}
    facebook
    {ABC}
    linkedin
    {ABC}
    twitter
    {ABC}
    github
    {ABC}
    website
    {...}
    urls
    {ABC}
    facebook
    {ABC}
    linkedin
    {ABC}
    twitter
    {ABC}
    github
    {ABC}
    website
    2.1.2.4.3.20.2 urls Hierarchy
    Parent field: subschema
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    facebookstringfalse

    URL to user's Facebook page.

    -
    linkedinstringfalse

    URL to user's Linkedin page.

    -
    twitterstringfalse

    URL to user's Twitter page.

    -
    githubstringfalse

    URL to user's Github page.

    -
    websitestringfalse

    URL to user's personal website.

    -
    2.1.2.4.3.20.3 urls properties
    PropertyValue
    Name urls
    Technical name
    Id
    Type document
    Description

    Document holding the user urls to external websites and social networks

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.4.3.21 Field facebook
    2.1.2.4.3.21.1 facebook Tree Diagram
    {ABC}
    facebook
    {ABC}
    facebook
    2.1.2.4.3.21.2 facebook properties
    PropertyValue
    Name facebook
    Technical name
    Id
    Type string
    Description

    URL to user's Facebook page.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://facebook.com/myProfile
    Comments
    2.1.2.4.3.22 Field linkedin
    2.1.2.4.3.22.1 linkedin Tree Diagram
    {ABC}
    linkedin
    {ABC}
    linkedin
    2.1.2.4.3.22.2 linkedin properties
    PropertyValue
    Name linkedin
    Technical name
    Id
    Type string
    Description

    URL to user's Linkedin page.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://linkedin.com/in/myProfile
    Comments
    2.1.2.4.3.23 Field twitter
    2.1.2.4.3.23.1 twitter Tree Diagram
    {ABC}
    twitter
    {ABC}
    twitter
    2.1.2.4.3.23.2 twitter properties
    PropertyValue
    Name twitter
    Technical name
    Id
    Type string
    Description

    URL to user's Twitter page.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://twitter.com/myProfile
    Comments
    2.1.2.4.3.24 Field github
    2.1.2.4.3.24.1 github Tree Diagram
    {ABC}
    github
    {ABC}
    github
    2.1.2.4.3.24.2 github properties
    PropertyValue
    Name github
    Technical name
    Id
    Type string
    Description

    URL to user's Github page.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://github.com/myProfile
    Comments
    2.1.2.4.3.25 Field website
    2.1.2.4.3.25.1 website Tree Diagram
    {ABC}
    website
    {ABC}
    website
    2.1.2.4.3.25.2 website properties
    PropertyValue
    Name website
    Technical name
    Id
    Type string
    Description

    URL to user's personal website.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://mypersonalwebsite.com
    Comments
    2.1.2.4.3.26 Field [1]
    2.1.2.4.3.26.1 [1] Tree Diagram
    {Sub}
    [subschema]
    {ABC}
    type
    {ABC}
    industry
    {_id}
    ownerId
    {ABC}
    name
    {...}
    needs
    {0/1}
    global
    {...}
    urls
    {ABC}
    language
    {Sub}
    [subschema]
    {ABC}
    type
    {ABC}
    industry
    {_id}
    ownerId
    {ABC}
    name
    {...}
    needs
    {0/1}
    global
    {...}
    urls
    {ABC}
    language
    2.1.2.4.3.26.2 [1] Hierarchy
    Parent field: objectives
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    typestringtrue

    The type of the organization. Can be: Community, Government, Health care provider, Non-profit, Other, R&D, Startup, Traditional Company and University. All names are store in lowercase only.

    -
    industrystringtrue

    Industry from which the organization participates. Plan is for this values to be scraped from linkedin industries.

    -
    ownerIdobjectIdtruefk

    _id of the user who owns the organization.

    -
    namestringtrue

    Organization's name.

    -
    needsdocumenttrue

    Document with what are the objectives of the organization through the application, such as finding volunteers, staff, investors and donors.

    -
    globalbooleanfalse

    Flag to indicate wheter this organization is global.

    -
    urlsdocumentfalse

    Document holding external urls and refs to the organization such as social media profiles.

    -
    languagestringfalse

    Field to inidicate the language used by the organization.

    -
    2.1.2.4.3.26.3 [1] properties
    PropertyValue
    Id organization
    Description

    Subschema representing an organization (colective) account.

    -
    Required
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.4.3.27 Field type
    2.1.2.4.3.27.1 type Tree Diagram
    {ABC}
    type
    {ABC}
    type
    2.1.2.4.3.27.2 type properties
    PropertyValue
    Name type
    Technical name
    Id
    Type string
    Description

    The type of the organization. Can be: Community, Government, Health care provider, Non-profit, Other, R&D, Startup, Traditional Company and University. All names are store in lowercase only.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum startup,traditional company,community,government,r&d,non-profit,university,health care provider,other
    Sample
    Comments
    2.1.2.4.3.28 Field industry
    2.1.2.4.3.28.1 industry Tree Diagram
    {ABC}
    industry
    {ABC}
    industry
    2.1.2.4.3.28.2 industry properties
    PropertyValue
    Name industry
    Technical name
    Id
    Type string
    Description

    Industry from which the organization participates. Plan is for this values to be scraped from linkedin industries.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.3.29 Field ownerId
    2.1.2.4.3.29.1 ownerId Tree Diagram
    {_id}
    ownerId
    {_id}
    ownerId
    2.1.2.4.3.29.2 ownerId properties
    PropertyValue
    Name ownerId
    Technical name
    Id
    Type objectId
    Description

    _id of the user who owns the organization.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection users
    Foreign field _id
    Relationship type Foreign Key
    Default
    Sample
    Comments
    2.1.2.4.3.30 Field name
    2.1.2.4.3.30.1 name Tree Diagram
    {ABC}
    name
    {ABC}
    name
    2.1.2.4.3.30.2 name properties
    PropertyValue
    Name name
    Technical name
    Id
    Type string
    Description

    Organization's name.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.3.31 Field needs
    2.1.2.4.3.31.1 needs Tree Diagram
    {...}
    needs
    {0/1}
    volunteers
    {0/1}
    donations
    {0/1}
    staff
    {0/1}
    other
    {...}
    needs
    {0/1}
    volunteers
    {0/1}
    donations
    {0/1}
    staff
    {0/1}
    other
    2.1.2.4.3.31.2 needs Hierarchy
    Parent field: urls
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    volunteersbooleantrue

    Flag to indicate wheter the organization is seeking volunteers through the app.

    -
    donationsbooleantrue

    Flag to indicate wheter the organization is seeking donations through the app.

    -
    staffbooleantrue

    Flag to indicate wheter the organization is seeking staff through the app.

    -
    otherbooleantrue

    Flag to indicate wheter the organization is seeking other needs through the app.

    -
    2.1.2.4.3.31.3 needs properties
    PropertyValue
    Name needs
    Technical name
    Id
    Type document
    Description

    Document with what are the objectives of the organization through the application, such as finding volunteers, staff, investors and donors.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.4.3.32 Field volunteers
    2.1.2.4.3.32.1 volunteers Tree Diagram
    {0/1}
    volunteers
    {0/1}
    volunteers
    2.1.2.4.3.32.2 volunteers properties
    PropertyValue
    Name volunteers
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the organization is seeking volunteers through the app.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample true
    Comments
    2.1.2.4.3.33 Field donations
    2.1.2.4.3.33.1 donations Tree Diagram
    {0/1}
    donations
    {0/1}
    donations
    2.1.2.4.3.33.2 donations properties
    PropertyValue
    Name donations
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the organization is seeking donations through the app.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.4.3.34 Field staff
    2.1.2.4.3.34.1 staff Tree Diagram
    {0/1}
    staff
    {0/1}
    staff
    2.1.2.4.3.34.2 staff properties
    PropertyValue
    Name staff
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the organization is seeking staff through the app.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.4.3.35 Field other
    2.1.2.4.3.35.1 other Tree Diagram
    {0/1}
    other
    {0/1}
    other
    2.1.2.4.3.35.2 other properties
    PropertyValue
    Name other
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the organization is seeking other needs through the app.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.4.3.36 Field global
    2.1.2.4.3.36.1 global Tree Diagram
    {0/1}
    global
    {0/1}
    global
    2.1.2.4.3.36.2 global properties
    PropertyValue
    Name global
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter this organization is global.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample
    Comments
    2.1.2.4.3.37 Field urls
    2.1.2.4.3.37.1 urls Tree Diagram
    {...}
    urls
    {ABC}
    linkedin
    {ABC}
    twitter
    {ABC}
    website
    {ABC}
    playstore
    {ABC}
    appstore
    {...}
    urls
    {ABC}
    linkedin
    {ABC}
    twitter
    {ABC}
    website
    {ABC}
    playstore
    {ABC}
    appstore
    2.1.2.4.3.37.2 urls Hierarchy
    Parent field: subschema
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    linkedinstringfalse

    URL to organization's Linkedin page.

    -
    twitterstringfalse

    URL to organization's Twitter page.

    -
    websitestringfalse

    URL to organization's website.

    -
    playstorestringfalse

    URL to organization's page at Google Play Store.

    -
    appstorestringfalse

    URL to organization's page at Apple App Store

    -
    2.1.2.4.3.37.3 urls properties
    PropertyValue
    Name urls
    Technical name
    Id
    Type document
    Description

    Document holding external urls and refs to the organization such as social media profiles.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.4.3.38 Field linkedin
    2.1.2.4.3.38.1 linkedin Tree Diagram
    {ABC}
    linkedin
    {ABC}
    linkedin
    2.1.2.4.3.38.2 linkedin properties
    PropertyValue
    Name linkedin
    Technical name
    Id
    Type string
    Description

    URL to organization's Linkedin page.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://linkedin.com/in/myProfile
    Comments
    2.1.2.4.3.39 Field twitter
    2.1.2.4.3.39.1 twitter Tree Diagram
    {ABC}
    twitter
    {ABC}
    twitter
    2.1.2.4.3.39.2 twitter properties
    PropertyValue
    Name twitter
    Technical name
    Id
    Type string
    Description

    URL to organization's Twitter page.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://twitter.com/myProfile
    Comments
    2.1.2.4.3.40 Field website
    2.1.2.4.3.40.1 website Tree Diagram
    {ABC}
    website
    {ABC}
    website
    2.1.2.4.3.40.2 website properties
    PropertyValue
    Name website
    Technical name
    Id
    Type string
    Description

    URL to organization's website.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://mypersonalwebsite.com
    Comments
    2.1.2.4.3.41 Field playstore
    2.1.2.4.3.41.1 playstore Tree Diagram
    {ABC}
    playstore
    {ABC}
    playstore
    2.1.2.4.3.41.2 playstore properties
    PropertyValue
    Name playstore
    Technical name
    Id
    Type string
    Description

    URL to organization's page at Google Play Store.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://playstore.com/myOrg
    Comments
    2.1.2.4.3.42 Field appstore
    2.1.2.4.3.42.1 appstore Tree Diagram
    {ABC}
    appstore
    {ABC}
    appstore
    2.1.2.4.3.42.2 appstore properties
    PropertyValue
    Name appstore
    Technical name
    Id
    Type string
    Description

    URL to organization's page at Apple App Store

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://appstore.com/myOrg
    Comments
    2.1.2.4.3.43 Field language
    2.1.2.4.3.43.1 language Tree Diagram
    {ABC}
    language
    {ABC}
    language
    2.1.2.4.3.43.2 language properties
    PropertyValue
    Name language
    Technical name
    Id
    Type string
    Description

    Field to inidicate the language used by the organization.

    -
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.3.44 Field anyOf
    2.1.2.4.3.44.1 anyOf Tree Diagram
    X
    {Sub}
    [0]
    {Sub}
    [1]
    {Sub}
    [0]
    {Sub}
    [1]
    2.1.2.4.3.44.2 anyOf Hierarchy
    Parent field: subschema
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    subschemasubschemafalse

    Case where the user comes from social networks with a registration that uses email. In this case, the email field is required. This case covers the great majority of currently supported social network authentications.

    -
    subschemasubschemafalse

    Case where the user comes from social networks with a registration that allows the use of only the phone. In this case, the phone field is required, and the email isn't.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.6.3.15 Field otherHelp
    2.1.2.6.3.15.1 otherHelp Tree Diagram
    2.1.2.6.3.15.2 otherHelp properties
    PropertyValue
    Name otherHelp
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the user needs non-medical help, such as getting groceries, medice and etc..

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.6.3.16 Field objectives
    2.1.2.6.3.16.1 objectives Tree Diagram
    2.1.2.6.3.16.2 objectives Hierarchy
    Parent field: [0] subschema
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    volunteerbooleantrue

    Flag to indicate wheter the user wants to volunteer for iniciatives through the app.

    +
    donatebooleantrue

    Flag to indicate wheter the user wants to donate for iniciatives through the app.

    +
    shareInformationbooleantrue

    Flag to indicate wheter the user wants to share information through the app.

    +
    2.1.2.6.3.16.3 objectives properties
    PropertyValue
    Name objectives
    Technical name
    Id
    Type document
    Description

    Document with what are the objectives of the user through the application, such as donating, volunteering or sharing information.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.6.3.17 Field volunteer
    2.1.2.6.3.17.1 volunteer Tree Diagram
    2.1.2.6.3.17.2 volunteer properties
    PropertyValue
    Name volunteer
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the user wants to volunteer for iniciatives through the app.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.6.3.18 Field donate
    2.1.2.6.3.18.1 donate Tree Diagram
    2.1.2.6.3.18.2 donate properties
    PropertyValue
    Name donate
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the user wants to donate for iniciatives through the app.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.6.3.19 Field shareInformation
    2.1.2.6.3.19.1 shareInformation Tree Diagram
    2.1.2.6.3.19.2 shareInformation properties
    PropertyValue
    Name shareInformation
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the user wants to share information through the app.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default true
    Sample true
    Comments
    2.1.2.6.3.20 Field urls
    2.1.2.6.3.20.1 urls Tree Diagram
    2.1.2.6.3.20.2 urls Hierarchy
    Parent field: [0] subschema
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    facebookstringfalse

    URL to user's Facebook page.

    +
    linkedinstringfalse

    URL to user's Linkedin page.

    +
    twitterstringfalse

    URL to user's Twitter page.

    +
    githubstringfalse

    URL to user's Github page.

    +
    websitestringfalse

    URL to user's personal website.

    +
    2.1.2.6.3.20.3 urls properties
    PropertyValue
    Name urls
    Technical name
    Id
    Type document
    Description

    Document holding the user urls to external websites and social networks

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.6.3.21 Field facebook
    2.1.2.6.3.21.1 facebook Tree Diagram
    2.1.2.6.3.21.2 facebook properties
    PropertyValue
    Name facebook
    Technical name
    Id
    Type string
    Description

    URL to user's Facebook page.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://facebook.com/myProfile
    Comments
    2.1.2.6.3.22 Field linkedin
    2.1.2.6.3.22.1 linkedin Tree Diagram
    2.1.2.6.3.22.2 linkedin properties
    PropertyValue
    Name linkedin
    Technical name
    Id
    Type string
    Description

    URL to user's Linkedin page.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://linkedin.com/in/myProfile
    Comments
    2.1.2.6.3.23 Field twitter
    2.1.2.6.3.23.1 twitter Tree Diagram
    2.1.2.6.3.23.2 twitter properties
    PropertyValue
    Name twitter
    Technical name
    Id
    Type string
    Description

    URL to user's Twitter page.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://twitter.com/myProfile
    Comments
    2.1.2.6.3.24 Field github
    2.1.2.6.3.24.1 github Tree Diagram
    2.1.2.6.3.24.2 github properties
    PropertyValue
    Name github
    Technical name
    Id
    Type string
    Description

    URL to user's Github page.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://github.com/myProfile
    Comments
    2.1.2.6.3.25 Field website
    2.1.2.6.3.25.1 website Tree Diagram
    2.1.2.6.3.25.2 website properties
    PropertyValue
    Name website
    Technical name
    Id
    Type string
    Description

    URL to user's personal website.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://mypersonalwebsite.com
    Comments
    2.1.2.6.3.26 Field [1] subschema
    2.1.2.6.3.26.1 [1] subschema Tree Diagram
    2.1.2.6.3.26.2 [1] subschema Hierarchy
    Parent field: oneOf
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    typestringtrue

    The type of the organization. Can be: Community, Government, Health care provider, Non-profit, Other, R&D, Startup, Traditional Company and University. All names are store in lowercase only.

    +
    industrystringtrue

    Industry from which the organization participates. Plan is for this values to be scraped from linkedin industries.

    +
    ownerIdobjectIdtruefk

    _id of the user who owns the organization.

    +
    namestringtrue

    Organization's name.

    +
    needsdocumenttrue

    Document with what are the objectives of the organization through the application, such as finding volunteers, staff, investors and donors.

    +
    globalbooleanfalse

    Flag to indicate wheter this organization is global.

    +
    urlsdocumentfalse

    Document holding external urls and refs to the organization such as social media profiles.

    +
    languagestringfalse

    Field to inidicate the language used by the organization.

    +
    2.1.2.6.3.26.3 [1] subschema properties
    PropertyValue
    Display name subschema
    Id organization
    Description

    Subschema representing an organization (colective) account.

    +
    Required
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.6.3.27 Field type
    2.1.2.6.3.27.1 type Tree Diagram
    2.1.2.6.3.27.2 type properties
    PropertyValue
    Name type
    Technical name
    Id
    Type string
    Description

    The type of the organization. Can be: Community, Government, Health care provider, Non-profit, Other, R&D, Startup, Traditional Company and University. All names are store in lowercase only.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum startup,traditional company,community,government,r&d,non-profit,university,health care provider,other
    Sample
    Comments
    2.1.2.6.3.28 Field industry
    2.1.2.6.3.28.1 industry Tree Diagram
    2.1.2.6.3.28.2 industry properties
    PropertyValue
    Name industry
    Technical name
    Id
    Type string
    Description

    Industry from which the organization participates. Plan is for this values to be scraped from linkedin industries.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.6.3.29 Field ownerId
    2.1.2.6.3.29.1 ownerId Tree Diagram
    2.1.2.6.3.29.2 ownerId properties
    PropertyValue
    Name ownerId
    Technical name
    Id
    Type objectId
    Description

    _id of the user who owns the organization.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection users
    Foreign field _id
    Relationship type Foreign Key
    Default
    Sample
    Comments
    2.1.2.6.3.30 Field name
    2.1.2.6.3.30.1 name Tree Diagram
    2.1.2.6.3.30.2 name properties
    PropertyValue
    Name name
    Technical name
    Id
    Type string
    Description

    Organization's name.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.6.3.31 Field needs
    2.1.2.6.3.31.1 needs Tree Diagram
    2.1.2.6.3.31.2 needs Hierarchy
    Parent field: [1] subschema
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    volunteersbooleantrue

    Flag to indicate wheter the organization is seeking volunteers through the app.

    +
    donationsbooleantrue

    Flag to indicate wheter the organization is seeking donations through the app.

    +
    staffbooleantrue

    Flag to indicate wheter the organization is seeking staff through the app.

    +
    otherbooleantrue

    Flag to indicate wheter the organization is seeking other needs through the app.

    +
    2.1.2.6.3.31.3 needs properties
    PropertyValue
    Name needs
    Technical name
    Id
    Type document
    Description

    Document with what are the objectives of the organization through the application, such as finding volunteers, staff, investors and donors.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.6.3.32 Field volunteers
    2.1.2.6.3.32.1 volunteers Tree Diagram
    2.1.2.6.3.32.2 volunteers properties
    PropertyValue
    Name volunteers
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the organization is seeking volunteers through the app.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample true
    Comments
    2.1.2.6.3.33 Field donations
    2.1.2.6.3.33.1 donations Tree Diagram
    2.1.2.6.3.33.2 donations properties
    PropertyValue
    Name donations
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the organization is seeking donations through the app.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.6.3.34 Field staff
    2.1.2.6.3.34.1 staff Tree Diagram
    2.1.2.6.3.34.2 staff properties
    PropertyValue
    Name staff
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the organization is seeking staff through the app.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.6.3.35 Field other
    2.1.2.6.3.35.1 other Tree Diagram
    2.1.2.6.3.35.2 other properties
    PropertyValue
    Name other
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the organization is seeking other needs through the app.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.6.3.36 Field global
    2.1.2.6.3.36.1 global Tree Diagram
    2.1.2.6.3.36.2 global properties
    PropertyValue
    Name global
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter this organization is global.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample
    Comments
    2.1.2.6.3.37 Field urls
    2.1.2.6.3.37.1 urls Tree Diagram
    2.1.2.6.3.37.2 urls Hierarchy
    Parent field: [1] subschema
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    linkedinstringfalse

    URL to organization's Linkedin page.

    +
    twitterstringfalse

    URL to organization's Twitter page.

    +
    websitestringfalse

    URL to organization's website.

    +
    playstorestringfalse

    URL to organization's page at Google Play Store.

    +
    appstorestringfalse

    URL to organization's page at Apple App Store

    +
    2.1.2.6.3.37.3 urls properties
    PropertyValue
    Name urls
    Technical name
    Id
    Type document
    Description

    Document holding external urls and refs to the organization such as social media profiles.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.6.3.38 Field linkedin
    2.1.2.6.3.38.1 linkedin Tree Diagram
    2.1.2.6.3.38.2 linkedin properties
    PropertyValue
    Name linkedin
    Technical name
    Id
    Type string
    Description

    URL to organization's Linkedin page.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://linkedin.com/in/myProfile
    Comments
    2.1.2.6.3.39 Field twitter
    2.1.2.6.3.39.1 twitter Tree Diagram
    2.1.2.6.3.39.2 twitter properties
    PropertyValue
    Name twitter
    Technical name
    Id
    Type string
    Description

    URL to organization's Twitter page.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://twitter.com/myProfile
    Comments
    2.1.2.6.3.40 Field website
    2.1.2.6.3.40.1 website Tree Diagram
    2.1.2.6.3.40.2 website properties
    PropertyValue
    Name website
    Technical name
    Id
    Type string
    Description

    URL to organization's website.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://mypersonalwebsite.com
    Comments
    2.1.2.6.3.41 Field playstore
    2.1.2.6.3.41.1 playstore Tree Diagram
    2.1.2.6.3.41.2 playstore properties
    PropertyValue
    Name playstore
    Technical name
    Id
    Type string
    Description

    URL to organization's page at Google Play Store.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://playstore.com/myOrg
    Comments
    2.1.2.6.3.42 Field appstore
    2.1.2.6.3.42.1 appstore Tree Diagram
    2.1.2.6.3.42.2 appstore properties
    PropertyValue
    Name appstore
    Technical name
    Id
    Type string
    Description

    URL to organization's page at Apple App Store

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://appstore.com/myOrg
    Comments
    2.1.2.6.3.43 Field language
    2.1.2.6.3.43.1 language Tree Diagram
    2.1.2.6.3.43.2 language properties
    PropertyValue
    Name language
    Technical name
    Id
    Type string
    Description

    Field to inidicate the language used by the organization.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.6.3.44 Field anyOf
    2.1.2.6.3.44.1 anyOf Tree Diagram
    2.1.2.6.3.44.2 anyOf Hierarchy
    Parent field: users
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    subschemasubschemafalse

    Case where the user comes from social networks with a registration that uses email. In this case, the email field is required. This case covers the great majority of currently supported social network authentications.

    +
    subschemasubschemafalse

    Case where the user comes from social networks with a registration that allows the use of only the phone. In this case, the phone field is required, and the email isn't.

    An example of ocial network that falls into this case is Twitter.

    -
    2.1.2.4.3.44.3 anyOf properties
    PropertyValue
    Choice anyOf
    2.1.2.4.3.45 Field [6]
    2.1.2.4.3.45.1 [6] Tree Diagram
    {Sub}
    [subschema]
    {ABC}
    email
    {Sub}
    [subschema]
    {ABC}
    email
    2.1.2.4.3.45.2 [6] Hierarchy
    Parent field: subschema
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    emailstringtrue

    User's email validated by a regex pattern.

    -
    2.1.2.4.3.45.3 [6] properties
    PropertyValue
    Id emailPK
    Description

    Case where the user comes from social networks with a registration that uses email. In this case, the email field is required. This case covers the great majority of currently supported social network authentications.

    -
    Required
    Min Properties
    Max Properties
    Additional properties true
    Comments
    2.1.2.4.3.46 Field email
    2.1.2.4.3.46.1 email Tree Diagram
    {ABC}
    email
    {ABC}
    email
    2.1.2.4.3.46.2 email properties
    PropertyValue
    Name email
    Technical name
    Id
    Type string
    Description

    User's email validated by a regex pattern.

    -
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format email
    Enum
    Sample test_user@fightpandemics.com
    Comments
    2.1.2.4.3.47 Field [1]
    2.1.2.4.3.47.1 [1] Tree Diagram
    {Sub}
    [subschema]
    {ABC}
    phone
    {Sub}
    [subschema]
    {ABC}
    phone
    2.1.2.4.3.47.2 [1] Hierarchy
    Parent field: urls
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    phonestringtrue
    2.1.2.4.3.47.3 [1] properties
    PropertyValue
    Id phonePK
    Description

    Case where the user comes from social networks with a registration that allows the use of only the phone. In this case, the phone field is required, and the email isn't.

    +
    2.1.2.6.3.44.3 anyOf properties
    PropertyValue
    Choice anyOf
    Description
    Comments
    2.1.2.6.3.45 Field [0] subschema
    2.1.2.6.3.45.1 [0] subschema Tree Diagram
    2.1.2.6.3.45.2 [0] subschema Hierarchy
    Parent field: anyOf
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    emailstringtrue

    User's email validated by a regex pattern.

    +
    2.1.2.6.3.45.3 [0] subschema properties
    PropertyValue
    Display name subschema
    Id emailPK
    Description

    Case where the user comes from social networks with a registration that uses email. In this case, the email field is required. This case covers the great majority of currently supported social network authentications.

    +
    Required
    Min Properties
    Max Properties
    Additional properties true
    Comments
    2.1.2.6.3.46 Field email
    2.1.2.6.3.46.1 email Tree Diagram
    2.1.2.6.3.46.2 email properties
    PropertyValue
    Name email
    Technical name
    Id
    Type string
    Description

    User's email validated by a regex pattern.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format email
    Enum
    Sample test_user@fightpandemics.com
    Comments
    2.1.2.6.3.47 Field [1] subschema
    2.1.2.6.3.47.1 [1] subschema Tree Diagram
    2.1.2.6.3.47.2 [1] subschema Hierarchy
    Parent field: anyOf
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    phonestringtrue
    2.1.2.6.3.47.3 [1] subschema properties
    PropertyValue
    Display name subschema
    Id phonePK
    Description

    Case where the user comes from social networks with a registration that allows the use of only the phone. In this case, the phone field is required, and the email isn't.

    An example of ocial network that falls into this case is Twitter.

    -
    Required
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.4.3.48 Field phone
    2.1.2.4.3.48.1 phone Tree Diagram
    {ABC}
    phone
    {ABC}
    phone
    2.1.2.4.3.48.2 phone properties
    PropertyValue
    Name phone
    Technical name
    Id
    Type string
    Description
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.4 users JSON Schema
    {
    +
    Required
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.6.3.48 Field phone
    2.1.2.6.3.48.1 phone Tree Diagram
    2.1.2.6.3.48.2 phone properties
    PropertyValue
    Name phone
    Technical name
    Id
    Type string
    Description
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.6.4 users JSON Schema
    {
         "$schema": "http://json-schema.org/draft-04/schema#",
         "type": "object",
         "title": "users",
    @@ -1510,7 +2220,7 @@
             "updatedAt",
             "authId"
         ]
    -}
    2.1.2.4.5 users JSON data
    {
    +}
    2.1.2.6.5 users JSON data
    {
         "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
         "_id": ObjectId("507f1f77bcf86cd799439011"),
         "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
    @@ -1548,7 +2258,7 @@
         },
         "language": "Lorem",
         "email": "test_user@fightpandemics.com"
    -}
    2.1.2.4.6 users Target Script
    use applicationDB;
    +}
    2.1.2.6.6 users Target Script
    use applicationDB;
     
     db.createCollection( "users",{
         "storageEngine": {
    @@ -1885,13 +2595,13 @@
         },
         "validationLevel": "off",
         "validationAction": "warn"
    -});
    3. Relationships
    3.1 Relationship PostHasComments
    3.1.1 PostHasComments Diagram
    Parent TableParent field
    posts _id
    Child TableChild field
    comments postId
    3.1.2 PostHasComments Properties
    PropertyValue
    Name PostHasComments
    Description Relationship between a Post and it's respective Comments made at it.
    Parent Collectionposts
    Parent field_id
    Parent Cardinality 1
    Child Collectioncomments
    Child fieldpostId
    Child Cardinality n
    Comments
    3.2 Relationship UserLikesComment
    3.2.1 UserLikesComment Diagram
    Parent TableParent field
    users _id
    Child TableChild field
    comments likes.[0]
    3.2.2 UserLikesComment Properties
    PropertyValue
    Name UserLikesComment
    Description Relation to represent the User's who liked a Comment. - -Even though this is a N-N relation, we opt to store the ids only at the Comment side as an array of _id (with the _id of the users who liked it).
    Parent Collectionusers
    Parent field_id
    Parent Cardinality n
    Child Collectioncomments
    Child field
    Child Cardinality n
    Comments
    3.3 Relationship UserLikesPost
    3.3.1 UserLikesPost Diagram
    Parent TableParent field
    users _id
    Child TableChild field
    posts likes.[0]
    3.3.2 UserLikesPost Properties
    PropertyValue
    Name UserLikesPost
    Description Relation to represent the User's who liked a Post. - -Even though this is a N-N relation, we opt to store the ids only at the Post side as an array of _id (with the _id of the users who liked it).
    Parent Collectionusers
    Parent field_id
    Parent Cardinality n
    Child Collectionposts
    Child field
    Child Cardinality n
    Comments
    3.4 Relationship fk comments._id to comments.parentId
    3.4.1 fk comments._id to comments.parentId Diagram
    Parent TableParent field
    comments _id
    Child TableChild field
    comments parentId
    3.4.2 fk comments._id to comments.parentId Properties
    PropertyValue
    Name fk comments._id to comments.parentId
    Description
    Parent Collectioncomments
    Parent field_id
    Parent Cardinality 1
    Child Collectioncomments
    Child fieldparentId
    Child Cardinality 1
    Comments
    3.5 Relationship fk users._id to comments.likes
    3.5.1 fk users._id to comments.likes Diagram
    Parent TableParent field
    users _id
    Child TableChild field
    comments likes
    3.5.2 fk users._id to comments.likes Properties
    PropertyValue
    Name fk users._id to comments.likes
    Description
    Parent Collectionusers
    Parent field_id
    Parent Cardinality 1
    Child Collectioncomments
    Child fieldlikes
    Child Cardinality 1
    Comments
    3.6 Relationship fk users._id to feedbacks.userId
    3.6.1 fk users._id to feedbacks.userId Diagram
    Parent TableParent field
    users _id
    Child TableChild field
    feedbacks userId
    3.6.2 fk users._id to feedbacks.userId Properties
    PropertyValue
    Name fk users._id to feedbacks.userId
    Description
    Parent Collectionusers
    Parent field_id
    Parent Cardinality 1
    Child Collectionfeedbacks
    Child fielduserId
    Child Cardinality 1
    Comments
    3.7 Relationship fk users._id to organizations..organization.ownerId
    3.7.1 fk users._id to organizations..organization.ownerId Diagram
    Parent TableParent field
    _id
    Child TableChild field
    [-1].[-1].[-1]
    3.7.2 fk users._id to organizations..organization.ownerId Properties
    PropertyValue
    Name fk users._id to organizations..organization.ownerId
    Description Relation between an User and an Organization created by him/her. Initially projected as 1-N, with only one User owning the Organization, it is though to later on be evolved into N-N, with many Users being able to manage the Organization with different roles.
    Parent Collection
    Parent field_id
    Parent Cardinality 1
    Child Collection
    Child field
    Child Cardinality n
    Comments
    3.8 Relationship fk users._id to posts..author.authorId
    3.8.1 fk users._id to posts..author.authorId Diagram
    Parent TableParent field
    users _id
    Child TableChild field
    posts author.author.id
    3.8.2 fk users._id to posts..author.authorId Properties
    PropertyValue
    Name fk users._id to posts..author.authorId
    Description Relation between a User and the Post created by him/her.
    Parent Collectionusers
    Parent field_id
    Parent Cardinality 1
    Child Collectionposts
    Child fieldid
    Child Cardinality n
    Comments
    +});
    3. Relationships
    3.1 Relationship CommentReferencesPost
    3.1.1 CommentReferencesPost Diagram
    Parent TableParent field
    comments _id
    Child TableChild field
    comments parentId
    3.1.2 CommentReferencesPost Properties
    PropertyValue
    Name CommentReferencesPost
    Description
    Parent Collectioncomments
    Parent field_id
    Parent Cardinality 1
    Child Collectioncomments
    Child fieldparentId
    Child Cardinality 1
    Comments
    3.2 Relationship PostHasComments
    3.2.1 PostHasComments Diagram
    Parent TableParent field
    posts _id
    Child TableChild field
    comments postId
    3.2.2 PostHasComments Properties
    PropertyValue
    Name PostHasComments
    Description Relationship between a Post and it's respective Comments made at it.
    Parent Collectionposts
    Parent field_id
    Parent Cardinality 1
    Child Collectioncomments
    Child fieldpostId
    Child Cardinality n
    Comments
    3.3 Relationship ThreadHasMessages
    3.3.1 ThreadHasMessages Diagram
    Parent TableParent field
    thread _id
    Child TableChild field
    messages threadId
    3.3.2 ThreadHasMessages Properties
    PropertyValue
    Name ThreadHasMessages
    Description
    Parent Collectionthread
    Parent field_id
    Parent Cardinality 1
    Child Collectionmessages
    Child fieldthreadId
    Child Cardinality 1
    Comments
    3.4 Relationship UserAuthorsComment
    3.4.1 UserAuthorsComment Diagram
    Parent TableParent field
    users _id
    Child TableChild field
    comments likes
    3.4.2 UserAuthorsComment Properties
    PropertyValue
    Name UserAuthorsComment
    Description
    Parent Collectionusers
    Parent field_id
    Parent Cardinality 1
    Child Collectioncomments
    Child fieldlikes
    Child Cardinality 1
    Comments
    3.5 Relationship UserAuthorsPost
    3.5.1 UserAuthorsPost Diagram
    Parent TableParent field
    users _id
    Child TableChild field
    posts author.[-1].id
    3.5.2 UserAuthorsPost Properties
    PropertyValue
    Name UserAuthorsPost
    Description Relation between a User and the Post created by him/her.
    Parent Collectionusers
    Parent field_id
    Parent Cardinality 1
    Child Collectionposts
    Child fieldid
    Child Cardinality n
    Comments
    3.6 Relationship UserGivesFeedback
    3.6.1 UserGivesFeedback Diagram
    Parent TableParent field
    users _id
    Child TableChild field
    feedbacks userId
    3.6.2 UserGivesFeedback Properties
    PropertyValue
    Name UserGivesFeedback
    Description
    Parent Collectionusers
    Parent field_id
    Parent Cardinality 1
    Child Collectionfeedbacks
    Child fielduserId
    Child Cardinality 1
    Comments
    3.7 Relationship UserLikesComment
    3.7.1 UserLikesComment Diagram
    Parent TableParent field
    users _id
    Child TableChild field
    comments likes.[-1]
    3.7.2 UserLikesComment Properties
    PropertyValue
    Name UserLikesComment
    Description Relation to represent the User's who liked a Comment. +Even though this is a N-N relation, we opt to store the ids only at the Comment side as an array of _id (with the _id of the users who liked it).
    Parent Collectionusers
    Parent field_id
    Parent Cardinality n
    Child Collectioncomments
    Child field
    Child Cardinality n
    Comments
    3.8 Relationship UserLikesPost
    3.8.1 UserLikesPost Diagram
    Parent TableParent field
    users _id
    Child TableChild field
    posts likes.[-1]
    3.8.2 UserLikesPost Properties
    PropertyValue
    Name UserLikesPost
    Description Relation to represent the User's who liked a Post. +Even though this is a N-N relation, we opt to store the ids only at the Post side as an array of _id (with the _id of the users who liked it).
    Parent Collectionusers
    Parent field_id
    Parent Cardinality n
    Child Collectionposts
    Child field
    Child Cardinality n
    Comments
    3.9 Relationship UserOwnsOrganization
    3.9.1 UserOwnsOrganization Diagram
    Parent TableParent field
    _id
    Child TableChild field
    [-1].[-1].[-1]
    3.9.2 UserOwnsOrganization Properties
    PropertyValue
    Name UserOwnsOrganization
    Description Relation between an User and an Organization created by him/her. Initially projected as 1-N, with only one User owning the Organization, it is though to later on be evolved into N-N, with many Users being able to manage the Organization with different roles.
    Parent Collection
    Parent field_id
    Parent Cardinality 1
    Child Collection
    Child field
    Child Cardinality n
    Comments
    + + - + \ No newline at end of file diff --git a/v3/data_model.json b/v3/data_model.json new file mode 100644 index 0000000..d28c17a --- /dev/null +++ b/v3/data_model.json @@ -0,0 +1,4425 @@ +{ + "GUID": "6b45e040-7fae-11ea-ba73-c97a35e85484", + "modelName": "FightPandemics", + "code": "FightPandemics", + "lastModifTS": "2020-09-13T03:32:12.170Z", + "persistenceSchemaVersion": "4", + "description": "", + "comments": "", + "author": "Nícolas de Araujo", + "version": "3", + "collections": [ + { + "GUID": "bd34fec0-7fb0-11ea-ba73-c97a35e85484", + "collectionName": "comments", + "code": "", + "type": "object", + "description": "", + "comments": "", + "$schema": "", + "additionalProperties": false, + "properties": [ + { + "type": "objectId", + "format": "", + "primaryKey": true, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [ + "296bfa70-7fb2-11ea-ba73-c97a35e85484", + "17776aa0-82f2-11ea-821a-a1813ece7f73" + ], + "foreignCollection": "", + "foreignField": [], + "sample": "", + "GUID": "e5c2c520-7fb0-11ea-ba73-c97a35e85484", + "name": "_id", + "code": "", + "description": "Automatically generated object_id as primary key.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {} + }, + { + "type": "date", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "default": "", + "format": "", + "sample": "", + "GUID": "11110b10-7fb1-11ea-ba73-c97a35e85484", + "name": "createdAt", + "code": "", + "description": "Timestamp with the comment's creation date", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "date", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "default": "", + "format": "", + "sample": "", + "GUID": "19aba640-7fb1-11ea-ba73-c97a35e85484", + "name": "updatedAt", + "code": "", + "description": "Timestamp with the comment's last update date", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "GUID": "e79df740-82f1-11ea-821a-a1813ece7f73", + "type": "reference", + "name": "author", + "$ref": "#model/definitions/author", + "refType": "model", + "ref": "ce5f8570-811e-11ea-a764-5d61b98a5ce8", + "refIdPath": [ + "6b45e040-7fae-11ea-ba73-c97a35e85484", + "6b460750-7fae-11ea-ba73-c97a35e85484", + "ce5f8570-811e-11ea-a764-5d61b98a5ce8" + ], + "required": true, + "code": "", + "primaryKey": false, + "hackoladeMeta": {}, + "error": {} + }, + { + "code": "", + "required": true, + "type": "objectId", + "name": "postId", + "GUID": "bd359b02-7fb0-11ea-ba73-c97a35e85484", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "96933f00-7fb2-11ea-ba73-c97a35e85484", + "foreignField": [], + "childRelationships": [], + "format": "", + "sample": "", + "description": "", + "comments": "", + "dependencies": [], + "id": "", + "error": {}, + "hackoladeMeta": {} + }, + { + "code": "", + "type": "objectId", + "name": "parentId", + "GUID": "bd359b01-7fb0-11ea-ba73-c97a35e85484", + "primaryKey": false, + "relationshipType": "Foreign Key", + "parentRelationship": "17776aa0-82f2-11ea-821a-a1813ece7f73", + "foreignCollection": "bd34fec0-7fb0-11ea-ba73-c97a35e85484", + "foreignField": [ + "bd34fec0-7fb0-11ea-ba73-c97a35e85484", + "e5c2c520-7fb0-11ea-ba73-c97a35e85484" + ], + "childRelationships": [], + "format": "", + "sample": "", + "description": "If the comment is nested (in another comment), this field will hold the _id of the parent comment. Optional field, where being blank means it is a root comment.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "error": {}, + "hackoladeMeta": {} + }, + { + "code": "", + "required": true, + "type": "string", + "name": "content", + "GUID": "bd3573f1-7fb0-11ea-ba73-c97a35e85484", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "enum": [], + "sample": "", + "description": "Stirng holding the comment's content.", + "comments": "", + "dependencies": [], + "id": "", + "error": {} + }, + { + "type": "array", + "properties": [ + { + "type": "objectId", + "format": "", + "primaryKey": false, + "relationshipType": "Foreign Key", + "parentRelationship": "e5f4d250-8108-11ea-a764-5d61b98a5ce8", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "sample": "", + "GUID": "deb75620-8108-11ea-a764-5d61b98a5ce8", + "description": "_id of the user who liked the comment", + "comments": "", + "required": false, + "id": "", + "hackoladeMeta": {}, + "arrayItem": true, + "arrayParentType": "array" + } + ], + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "additionalItems": true, + "minItems": "", + "maxItems": "", + "uniqueItems": true, + "enum": [], + "GUID": "deadb930-8108-11ea-a764-5d61b98a5ce8", + "name": "likes", + "code": "", + "description": "Array holding the user_id of all the users who liked the comment.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": {} + } + ], + "definitions": { + "GUID": "bd36ac70-7fb0-11ea-ba73-c97a35e85484", + "properties": [], + "type": "definitions" + }, + "capped": false, + "validationLevel": "Off", + "validationAction": "Warn", + "size": "", + "max": "", + "storageEngineName": "WiredTiger", + "collectionUsers": [], + "indexes": [ + { + "GUID": "4bfaad80-7fb1-11ea-ba73-c97a35e85484", + "name": "New Index", + "key": [ + { + "keyId": "11110b10-7fb1-11ea-ba73-c97a35e85484", + "type": "ascending" + }, + { + "keyId": "bd359b01-7fb0-11ea-ba73-c97a35e85484", + "type": "ascending" + }, + { + "keyId": "bd359b02-7fb0-11ea-ba73-c97a35e85484", + "type": "ascending" + } + ], + "unique": false, + "dropDups": false, + "sparse": false, + "expireAfterSeconds": "", + "background": false, + "weights": "", + "min": -180, + "max": 180, + "bits": 26, + "language_override": "language", + "storageEngineName": "WiredTiger", + "collation": {} + } + ], + "collation": {}, + "sharding": { + "key": "", + "hashed": false, + "unique": true, + "numInitialChunks": "", + "collation": "null", + "zone": "", + "comments": "" + }, + "bucketId": "bd396b90-7fb0-11ea-ba73-c97a35e85484", + "hackoladeMeta": { + "validationErrors": {} + } + }, + { + "GUID": "96933f00-7fb2-11ea-ba73-c97a35e85484", + "collectionName": "posts", + "code": "", + "type": "object", + "description": "Document to represent a post, asking or offering help to be displayed on the feed", + "comments": "", + "$schema": "", + "additionalProperties": false, + "properties": [ + { + "type": "objectId", + "format": "", + "primaryKey": true, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [ + "c11beb00-7fb2-11ea-ba73-c97a35e85484" + ], + "foreignCollection": "", + "foreignField": [], + "sample": "", + "GUID": "ae4f24b0-7fb2-11ea-ba73-c97a35e85484", + "name": "_id", + "code": "", + "description": "", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "date", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "default": "", + "format": "", + "sample": "", + "GUID": "d1e87b60-80ed-11ea-a764-5d61b98a5ce8", + "name": "createdAt", + "code": "", + "description": "Timestamp with the post's creation date", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "date", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "default": "", + "format": "", + "sample": "", + "GUID": "e5380640-80ed-11ea-a764-5d61b98a5ce8", + "name": "updatedAt", + "code": "", + "description": "Timestamp with the post's last update date", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "date", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "default": "", + "format": "", + "sample": "", + "GUID": "fa13d670-80ed-11ea-a764-5d61b98a5ce8", + "name": "expireAt", + "code": "", + "description": "Timestamp with the date the post will expire.\nIf no expiration date is present, the post does not expire.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "GUID": "db65c2f0-82f1-11ea-821a-a1813ece7f73", + "type": "reference", + "name": "author", + "$ref": "#model/definitions/author", + "refType": "model", + "ref": "ce5f8570-811e-11ea-a764-5d61b98a5ce8", + "refIdPath": [ + "6b45e040-7fae-11ea-ba73-c97a35e85484", + "6b460750-7fae-11ea-ba73-c97a35e85484", + "ce5f8570-811e-11ea-a764-5d61b98a5ce8" + ], + "required": true, + "code": "", + "primaryKey": false, + "foreignCollection": "", + "foreignField": [], + "relationshipType": "", + "hackoladeMeta": {} + }, + { + "code": "", + "required": true, + "type": "string", + "name": "title", + "GUID": "9693b43e-7fb2-11ea-ba73-c97a35e85484", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "enum": [], + "sample": "", + "description": "The post title.", + "comments": "", + "dependencies": [], + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "code": "", + "required": true, + "type": "string", + "name": "content", + "GUID": "9693b432-7fb2-11ea-ba73-c97a35e85484", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "enum": [], + "sample": "", + "description": "String for the post content.", + "comments": "", + "dependencies": [], + "id": "", + "error": {} + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [ + "request", + "offer" + ], + "sample": "offer", + "GUID": "34559590-80ed-11ea-a764-5d61b98a5ce8", + "name": "objective", + "code": "", + "description": "Field to indicate the post's objective.\nCurrently only two values allowed: \"offering help\" and \"looking for help\".", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "enum": false, + "enums": [ + false, + false + ], + "sample": false + } + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [ + "zipcode", + "state", + "country", + "worldwide" + ], + "sample": "", + "GUID": "84c021d0-80ed-11ea-a764-5d61b98a5ce8", + "name": "visibility", + "code": "", + "description": "Field to specify the post's visibility. It can be: worldwide, country, state and zipcode.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "enum": false, + "enums": [ + false, + false, + false, + false + ] + } + }, + { + "type": "array", + "properties": [ + { + "type": "objectId", + "format": "", + "primaryKey": false, + "relationshipType": "Foreign Key", + "parentRelationship": "1306e850-8109-11ea-a764-5d61b98a5ce8", + "childRelationships": [], + "foreignCollection": "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "foreignField": [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "fa469f60-7fb2-11ea-ba73-c97a35e85484" + ], + "sample": "", + "GUID": "04dad340-8109-11ea-a764-5d61b98a5ce8", + "description": "_id of the user who liked the post", + "comments": "", + "required": false, + "id": "", + "hackoladeMeta": {}, + "arrayItem": true, + "arrayParentType": "array" + } + ], + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "additionalItems": true, + "minItems": "", + "maxItems": "", + "uniqueItems": true, + "enum": [], + "GUID": "04d0c120-8109-11ea-a764-5d61b98a5ce8", + "name": "likes", + "code": "", + "description": "Array holding the user_id of all the users who liked the post.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "code": "", + "type": "array", + "name": "types", + "GUID": "9693b43d-7fb2-11ea-ba73-c97a35e85484", + "properties": [ + { + "type": "string", + "arrayItem": true, + "GUID": "9695d712-7fb2-11ea-ba73-c97a35e85484", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "enum": [ + "Medical Supplies", + "Groceries/Food", + "Business", + "Education", + "Legal", + "Wellbeing/Mental", + "Entertainment", + "Information", + "Funding", + "R&D", + "Others" + ], + "sample": "Groceries/Food", + "description": "", + "comments": "", + "required": false, + "id": "", + "hackoladeMeta": {}, + "arrayParentType": "array", + "error": { + "enum": false, + "enums": [ + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "sample": false + } + } + ], + "primaryKey": false, + "additionalItems": true, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "minItems": "", + "maxItems": "", + "uniqueItems": false, + "enum": [], + "description": "Array with the post's tags.\nCan be: Medical Supplies, Groceries/Food, Business, Education, Legal, Wellbeing/Mental, Entertainment, Information, Funding, R&D and Others", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "code": "", + "type": "array", + "name": "language", + "GUID": "9693b434-7fb2-11ea-ba73-c97a35e85484", + "properties": [ + { + "type": "string", + "arrayItem": true, + "GUID": "9694ecb0-7fb2-11ea-ba73-c97a35e85484", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "enum": [], + "sample": "", + "description": "", + "comments": "", + "required": false, + "id": "", + "hackoladeMeta": {}, + "arrayParentType": "array" + } + ], + "primaryKey": false, + "additionalItems": true, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "minItems": "", + "maxItems": "", + "uniqueItems": false, + "enum": [], + "description": "", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "document", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "properties": [ + { + "code": "", + "type": "string", + "name": "email", + "GUID": "9693b43a-7fb2-11ea-ba73-c97a35e85484", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "enum": [], + "sample": "", + "description": "An email related to the post's content.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "code": "", + "type": "string", + "name": "website", + "GUID": "9693b440-7fb2-11ea-ba73-c97a35e85484", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "enum": [], + "sample": "", + "description": "Link for a website related to the post's content.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "code": "", + "type": "string", + "name": "playStore", + "GUID": "96938d20-7fb2-11ea-ba73-c97a35e85484", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "enum": [], + "sample": "", + "description": "Link for a Play Store application related to the post's content.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "code": "", + "type": "string", + "name": "appStore", + "GUID": "9693b433-7fb2-11ea-ba73-c97a35e85484", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "enum": [], + "sample": "", + "description": "Link for a AppStore application related to the post's content.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": {} + } + ], + "dependencies": [], + "minProperties": "", + "maxProperties": "", + "additionalProperties": false, + "enum": [], + "GUID": "56741420-810c-11ea-a764-5d61b98a5ce8", + "name": "externalLinks", + "code": "", + "description": "", + "comments": "", + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": {} + } + ], + "definitions": { + "GUID": "96962530-7fb2-11ea-ba73-c97a35e85484", + "properties": [], + "type": "definitions" + }, + "capped": false, + "validationLevel": "Off", + "validationAction": "Warn", + "size": "", + "max": "", + "storageEngineName": "WiredTiger", + "collectionUsers": [], + "indexes": [], + "collation": {}, + "sharding": { + "key": "", + "hashed": false, + "unique": true, + "numInitialChunks": "", + "collation": "null", + "zone": "", + "comments": "" + }, + "bucketId": "bd396b90-7fb0-11ea-ba73-c97a35e85484", + "hackoladeMeta": { + "validationErrors": {} + } + }, + { + "GUID": "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "collectionName": "users", + "code": "", + "type": "object", + "description": "Collection that holds all the data on system's users. \n\nThe users can be of **two types**: **(1) Individual**, representing a private user account; and **(2) Organization**, representing an organization of various types.\n\nThe field 'type' is used to differentiate between the two subschemas, with 'individual' representing private user accounts and \"Community\", \"Government\", \"Health care provider\", \"Non-profit\", \"Other\", \"R&D\", \"Startup\", \"Traditional Company\" and \"University\".", + "comments": "", + "$schema": "", + "additionalProperties": true, + "properties": [ + { + "code": "", + "type": "date", + "name": "createdAt", + "GUID": "efec52d0-7fb2-11ea-ba73-c97a35e85484", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "default": "", + "format": "", + "sample": "", + "description": "Timestamp with the user's creation date", + "comments": "Thu Apr 16 2020 04:59:24 GMT-0300 (Horário Padrão de Brasília): changed the name to registeredAt", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "objectId", + "format": "", + "primaryKey": true, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [ + "e5f4d250-8108-11ea-a764-5d61b98a5ce8", + "1306e850-8109-11ea-a764-5d61b98a5ce8", + "f71e1580-82ef-11ea-821a-a1813ece7f73", + "db833600-82f1-11ea-821a-a1813ece7f73", + "10f59d50-82f2-11ea-821a-a1813ece7f73", + "dda294d0-84b8-11ea-8f4d-0b62bb8cf8ca", + "1cc36b20-f571-11ea-bd96-cde8cae0469c" + ], + "foreignCollection": "", + "foreignField": [], + "sample": "", + "GUID": "fa469f60-7fb2-11ea-ba73-c97a35e85484", + "name": "_id", + "code": "", + "description": "Automatically generated _it as primary key.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "date", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "default": "", + "format": "", + "sample": "", + "GUID": "26eca310-80e5-11ea-a764-5d61b98a5ce8", + "name": "updatedAt", + "code": "", + "description": "Timestamp indicating last update on the database.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "09b06ae4-82f0-11ea-821a-a1813ece7f73", + "name": "authId", + "code": "", + "description": "String holding the authentication service id (Auth0).\n\nThis field is a **foreign key to the user in the Auth0 database**, connecting through the user_id field.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "GUID": "4a8675d0-80ea-11ea-a764-5d61b98a5ce8", + "type": "reference", + "name": "location", + "$ref": "#model/definitions/location", + "refType": "model", + "ref": "efec52d4-7fb2-11ea-ba73-c97a35e85484", + "refIdPath": [ + "6b45e040-7fae-11ea-ba73-c97a35e85484", + "6b460750-7fae-11ea-ba73-c97a35e85484", + "efec52d4-7fb2-11ea-ba73-c97a35e85484" + ], + "required": false, + "code": "", + "primaryKey": false, + "hackoladeMeta": {}, + "dependencies": [], + "error": {} + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "47c64130-80e6-11ea-a764-5d61b98a5ce8", + "name": "about", + "code": "", + "description": "Small self-introduction, limited to 100 char", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "uri", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "09b06af1-82f0-11ea-821a-a1813ece7f73", + "name": "photo", + "code": "", + "description": "URI with the location of the profile's photo.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "choice", + "properties": [ + { + "GUID": "5f6e24f0-82ef-11ea-821a-a1813ece7f73", + "name": "subschema", + "type": "subschema", + "value": "", + "properties": [ + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [ + "individual" + ], + "sample": "", + "GUID": "587bc610-82f0-11ea-821a-a1813ece7f73", + "name": "type", + "code": "", + "description": "", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "code": "", + "required": true, + "type": "string", + "name": "firstName", + "GUID": "efec52d2-7fb2-11ea-ba73-c97a35e85484", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "enum": [], + "sample": "", + "description": "The first name of the user", + "comments": "", + "dependencies": [], + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "code": "", + "required": false, + "type": "string", + "name": "lastName", + "GUID": "efec52d3-7fb2-11ea-ba73-c97a35e85484", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "enum": [], + "sample": "", + "description": "The last name of the user. Optional field.", + "comments": "", + "dependencies": [], + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "document", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "properties": [ + { + "type": "boolean", + "default": "false", + "enum": [], + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "sample": "false", + "GUID": "f5d30400-80e3-11ea-a764-5d61b98a5ce8", + "name": "medicalHelp", + "code": "", + "description": "Flag to indicate wheter the user needs medical help. \nMarking this indicates he shows symptoms of COVID-19.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false, + "default": false, + "sample": false + } + }, + { + "type": "boolean", + "default": "false", + "enum": [], + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "sample": "false", + "GUID": "25189bd0-80e4-11ea-a764-5d61b98a5ce8", + "name": "otherHelp", + "code": "", + "description": "Flag to indicate wheter the user needs non-medical help, such as getting groceries, medice and etc..", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false, + "default": false, + "sample": false + } + } + ], + "dependencies": [], + "minProperties": "", + "maxProperties": "", + "additionalProperties": false, + "enum": [], + "GUID": "efa3c380-80e3-11ea-a764-5d61b98a5ce8", + "name": "needs", + "code": "", + "description": "User's need in the app, representing what kind of help he/she needs", + "comments": "", + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "document", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "properties": [ + { + "type": "boolean", + "default": "false", + "enum": [], + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "sample": "false", + "GUID": "92e56f30-80e4-11ea-a764-5d61b98a5ce8", + "name": "volunteer", + "code": "", + "description": "Flag to indicate wheter the user wants to volunteer for iniciatives through the app.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false, + "default": false, + "sample": false + } + }, + { + "type": "boolean", + "default": "false", + "enum": [], + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "sample": "false", + "GUID": "a822e760-80e4-11ea-a764-5d61b98a5ce8", + "name": "donate", + "code": "", + "description": "Flag to indicate wheter the user wants to donate for iniciatives through the app.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false, + "default": false, + "sample": false + } + }, + { + "type": "boolean", + "default": "true", + "enum": [], + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "sample": "true", + "GUID": "c1c25a20-80e4-11ea-a764-5d61b98a5ce8", + "name": "shareInformation", + "code": "", + "description": "Flag to indicate wheter the user wants to share information through the app.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false, + "default": false, + "sample": false + } + } + ], + "dependencies": [], + "minProperties": "", + "maxProperties": "", + "additionalProperties": false, + "enum": [], + "GUID": "72542f40-80e4-11ea-a764-5d61b98a5ce8", + "name": "objectives", + "code": "", + "description": "Document with what are the objectives of the user through the application, such as donating, volunteering or sharing information.", + "comments": "", + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "document", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "properties": [ + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "uri", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "http://facebook.com/myProfile", + "GUID": "47f3d650-80e5-11ea-a764-5d61b98a5ce8", + "name": "facebook", + "code": "", + "description": "URL to user's Facebook page.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false, + "sample": false + } + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "uri", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "http://linkedin.com/in/myProfile", + "GUID": "6dd34590-80e5-11ea-a764-5d61b98a5ce8", + "name": "linkedin", + "code": "", + "description": "URL to user's Linkedin page.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": { + "sample": false + } + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "uri", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "http://twitter.com/myProfile", + "GUID": "70e9fb70-80e5-11ea-a764-5d61b98a5ce8", + "name": "twitter", + "code": "", + "description": "URL to user's Twitter page.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": { + "sample": false + } + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "uri", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "http://github.com/myProfile", + "GUID": "8165cce0-80e5-11ea-a764-5d61b98a5ce8", + "name": "github", + "code": "", + "description": "URL to user's Github page.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": { + "sample": false + } + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "uri", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "http://mypersonalwebsite.com", + "GUID": "884300a0-80e5-11ea-a764-5d61b98a5ce8", + "name": "website", + "code": "", + "description": "URL to user's personal website.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": { + "sample": false + } + } + ], + "dependencies": [], + "minProperties": "", + "maxProperties": "", + "additionalProperties": false, + "enum": [], + "GUID": "94f87b40-80e5-11ea-a764-5d61b98a5ce8", + "name": "urls", + "code": "", + "description": "Document holding the user urls to external websites and social networks", + "comments": "", + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + } + ], + "description": "Subschema representing a individual account.", + "comments": "", + "id": "individual", + "additionalProperties": true, + "error": {}, + "displayName": "subschema" + }, + { + "GUID": "a43c95d0-82ef-11ea-821a-a1813ece7f73", + "name": "subschema", + "type": "subschema", + "value": "", + "properties": [ + { + "code": "", + "required": true, + "type": "string", + "name": "type", + "GUID": "09b06af3-82f0-11ea-821a-a1813ece7f73", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "enum": [ + "startup", + "traditional company", + "community", + "government", + "r&d", + "non-profit", + "university", + "health care provider", + "other" + ], + "sample": "", + "description": "The type of the organization. Can be: Community, Government, Health care provider, Non-profit, Other, R&D, Startup, Traditional Company and University. All names are store in lowercase only.", + "comments": "", + "dependencies": [], + "id": "", + "hackoladeMeta": {}, + "error": { + "enum": false, + "enums": [ + false, + false, + false, + false, + false, + false, + false, + false, + false + ] + } + }, + { + "code": "", + "required": true, + "type": "string", + "name": "industry", + "GUID": "09b06af4-82f0-11ea-821a-a1813ece7f73", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "enum": [], + "sample": "", + "description": "Industry from which the organization participates. Plan is for this values to be scraped from linkedin industries.", + "comments": "", + "dependencies": [], + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "objectId", + "format": "", + "primaryKey": false, + "relationshipType": "Foreign Key", + "parentRelationship": "c794b120-8132-11ea-a764-5d61b98a5ce8", + "childRelationships": [], + "foreignCollection": "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "foreignField": [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "fa469f60-7fb2-11ea-ba73-c97a35e85484" + ], + "sample": "", + "GUID": "09b06ae5-82f0-11ea-821a-a1813ece7f73", + "name": "ownerId", + "code": "", + "description": "_id of the user who owns the organization.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "code": "", + "required": true, + "type": "string", + "name": "name", + "GUID": "09b06ae7-82f0-11ea-821a-a1813ece7f73", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "enum": [], + "sample": "", + "description": "Organization's name.\n", + "comments": "", + "dependencies": [], + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "document", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "properties": [ + { + "type": "boolean", + "default": "false", + "enum": [], + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "sample": "true", + "GUID": "09b06af7-82f0-11ea-821a-a1813ece7f73", + "name": "volunteers", + "code": "", + "description": "Flag to indicate wheter the organization is seeking volunteers through the app.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "sample": false + } + }, + { + "type": "boolean", + "default": "false", + "enum": [], + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "sample": "false", + "GUID": "09b06af8-82f0-11ea-821a-a1813ece7f73", + "name": "donations", + "code": "", + "description": "Flag to indicate wheter the organization is seeking donations through the app.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "boolean", + "default": "false", + "enum": [], + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "sample": "false", + "GUID": "09b06af9-82f0-11ea-821a-a1813ece7f73", + "name": "staff", + "code": "", + "description": "Flag to indicate wheter the organization is seeking staff through the app.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "sample": false + } + }, + { + "type": "boolean", + "default": "false", + "enum": [], + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "sample": "false", + "GUID": "09b06afa-82f0-11ea-821a-a1813ece7f73", + "name": "other", + "code": "", + "description": "Flag to indicate wheter the organization is seeking other needs through the app.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false, + "sample": false + } + } + ], + "dependencies": [], + "minProperties": "", + "maxProperties": "", + "additionalProperties": false, + "enum": [], + "GUID": "09b06af6-82f0-11ea-821a-a1813ece7f73", + "name": "needs", + "code": "", + "description": "Document with what are the objectives of the organization through the application, such as finding volunteers, staff, investors and donors.", + "comments": "", + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "code": "", + "type": "boolean", + "name": "global", + "GUID": "09b06aea-82f0-11ea-821a-a1813ece7f73", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "default": "false", + "enum": [], + "sample": "", + "description": "Flag to indicate wheter this organization is global.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": { + "default": false + } + }, + { + "type": "document", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "properties": [ + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "uri", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "http://linkedin.com/in/myProfile", + "GUID": "09b06aec-82f0-11ea-821a-a1813ece7f73", + "name": "linkedin", + "code": "", + "description": "URL to organization's Linkedin page.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "uri", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "http://twitter.com/myProfile", + "GUID": "09b06aed-82f0-11ea-821a-a1813ece7f73", + "name": "twitter", + "code": "", + "description": "URL to organization's Twitter page.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "uri", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "http://mypersonalwebsite.com", + "GUID": "09b06aee-82f0-11ea-821a-a1813ece7f73", + "name": "website", + "code": "", + "description": "URL to organization's website.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "uri", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "http://playstore.com/myOrg", + "GUID": "09b06aef-82f0-11ea-821a-a1813ece7f73", + "name": "playstore", + "code": "", + "description": "URL to organization's page at Google Play Store.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": { + "sample": false + } + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "uri", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "http://appstore.com/myOrg", + "GUID": "09b06af0-82f0-11ea-821a-a1813ece7f73", + "name": "appstore", + "code": "", + "description": "URL to organization's page at Apple App Store", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": { + "sample": false + } + } + ], + "dependencies": [], + "minProperties": "", + "maxProperties": "", + "additionalProperties": false, + "enum": [], + "GUID": "09b06aeb-82f0-11ea-821a-a1813ece7f73", + "name": "urls", + "code": "", + "description": "Document holding external urls and refs to the organization such as social media profiles.", + "comments": "", + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "code": "", + "type": "string", + "name": "language", + "GUID": "09b06af5-82f0-11ea-821a-a1813ece7f73", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "enum": [], + "sample": "", + "description": "Field to inidicate the language used by the organization.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": {} + } + ], + "description": "Subschema representing an organization (colective) account.", + "comments": "", + "id": "organization", + "additionalProperties": false, + "error": {}, + "displayName": "subschema" + } + ], + "choice": "oneOf", + "GUID": "5f2b2880-82ef-11ea-821a-a1813ece7f73" + }, + { + "type": "choice", + "properties": [ + { + "GUID": "553729a1-8bc8-11ea-8bf8-cf9318f71002", + "name": "subschema", + "type": "subschema", + "value": "", + "properties": [ + { + "code": "", + "required": true, + "type": "string", + "name": "email", + "GUID": "efec52d1-7fb2-11ea-ba73-c97a35e85484", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "email", + "default": "", + "enum": [], + "sample": "test_user@fightpandemics.com", + "description": "User's email validated by a regex pattern.", + "comments": "", + "dependencies": [], + "id": "", + "error": { + "sample": false + }, + "hackoladeMeta": {} + } + ], + "description": "Case where the user comes from social networks with a registration that uses email. In this case, the email field is required. This case covers the great majority of currently supported social network authentications.", + "comments": "", + "id": "emailPK", + "additionalProperties": true, + "hackoladeMeta": {}, + "error": {}, + "displayName": "subschema" + }, + { + "GUID": "6d920e70-8bc8-11ea-8bf8-cf9318f71002", + "name": "subschema", + "type": "subschema", + "value": "", + "properties": [ + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "720aec60-8bc8-11ea-8bf8-cf9318f71002", + "name": "phone", + "code": "", + "description": "", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": {} + } + ], + "description": "Case where the user comes from social networks with a registration that allows the use of only the phone. In this case, the phone field is required, and the email isn't. \n\nAn example of ocial network that falls into this case is Twitter.", + "comments": "", + "id": "phonePK", + "additionalProperties": false, + "error": {}, + "displayName": "subschema" + } + ], + "choice": "anyOf", + "GUID": "54fd06d0-8bc8-11ea-8bf8-cf9318f71002" + } + ], + "definitions": { + "GUID": "efecef10-7fb2-11ea-ba73-c97a35e85484", + "properties": [], + "type": "definitions" + }, + "capped": false, + "validationLevel": "Off", + "validationAction": "Warn", + "size": "", + "max": "", + "storageEngineName": "WiredTiger", + "collectionUsers": [], + "indexes": [], + "collation": {}, + "sharding": { + "key": "", + "hashed": false, + "unique": true, + "numInitialChunks": "", + "collation": "null", + "zone": "", + "comments": "" + }, + "bucketId": "bd396b90-7fb0-11ea-ba73-c97a35e85484", + "hackoladeMeta": { + "validationErrors": {} + } + }, + { + "GUID": "05136460-84b7-11ea-8f4d-0b62bb8cf8ca", + "collectionName": "feedbacks", + "code": "", + "type": "object", + "description": "Collection to hold feedback on the application.\n\nThis may be done with the user logged or not and, depending on that, we may or may not have a reference to the user in question at this model.", + "comments": "", + "$schema": "", + "additionalProperties": false, + "properties": [ + { + "type": "date", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "default": "", + "format": "", + "sample": "", + "GUID": "939a9470-84c0-11ea-929b-770c2f9d8801", + "name": "createdAt", + "code": "", + "description": "Timestamp with the feedback's creation date", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "objectId", + "format": "", + "primaryKey": true, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "sample": "", + "GUID": "3d427ab0-84b7-11ea-8f4d-0b62bb8cf8ca", + "name": "_id", + "code": "", + "description": "Automatically generated object_id as primary key.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "date", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "default": "", + "format": "", + "sample": "", + "GUID": "97510cc0-84c0-11ea-929b-770c2f9d8801", + "name": "updatedAt", + "code": "", + "description": "Timestamp with the feedback's last update date", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "numeric", + "mode": "", + "unit": "", + "minimum": 1, + "exclusiveMinimum": false, + "maximum": 5, + "exclusiveMaximum": false, + "multipleOf": "", + "divisibleBy": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "a408c060-84b7-11ea-8f4d-0b62bb8cf8ca", + "name": "rating", + "code": "", + "description": "A rating, in a scale of 1 to 5, of the application.\n\nCurrently present as: \"How well does FIghtPandemics meet your needs?\".\n\nPresent in the first part of the feedback and, therefore, is required.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "ipv4", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "0cca60e0-84b8-11ea-8f4d-0b62bb8cf8ca", + "name": "ipAddress", + "code": "", + "description": "Caputred IP address in order to get user's location even if they are not logged.\n\nCaptured at the first part of the feedback and, therefore, is required.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "numeric", + "mode": "integer64", + "unit": "", + "minimum": 18, + "exclusiveMinimum": false, + "maximum": "", + "exclusiveMaximum": false, + "multipleOf": "", + "divisibleBy": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "975b3500-84b7-11ea-8f4d-0b62bb8cf8ca", + "name": "age", + "code": "", + "description": "User's age.\n\nCurrently present as: \"What is your age?\".\n\nPresent in the third part of the feedback and, therefore, not required.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "5128d1e0-84b8-11ea-8f4d-0b62bb8cf8ca", + "name": "mostValuableFeature", + "code": "", + "description": "User's feedback into what is the features most valuable for him/her.\n\nCurrently present as: \"Which features are the most valuable for you?\".\n\nPresent in the second part of the feedback and, therefore, not required.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "9a1110c0-84b8-11ea-8f4d-0b62bb8cf8ca", + "name": "whatWouldChange", + "code": "", + "description": "User's feedback into what he/she would change about the application.\n\nCurrently present as: \"If you could change one thing about FightPandemics, what would it be?\".\n\nPresent in the second part of the feedback and, therefore, not required.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "a4e177b0-84b8-11ea-8f4d-0b62bb8cf8ca", + "name": "generalFeedback", + "code": "", + "description": "User's general feedback section.\n\nCurrently present as: \"Any other feedback for us?\".\n\nPresent in the second part of the feedback and, therefore, not required.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "f5f897a0-84b8-11ea-8f4d-0b62bb8cf8ca", + "name": "covidImpact", + "code": "", + "description": "User's feedback into how the COVID impacted him.\n\nCurrently present as a multiple choice question.\n\n**Question:** \"How has COVID-19 impacted you?\"\n\n**Options:** \n\n1. I go to work/school normally\n2. I am healthy but in a stay-at-home quarentine\n3. I have mild symptoms but haven't been tested\n4. I am diagnosed with COVID-19\n\n\nPresent in the second part of the feedback and, therefore, not required.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "objectId", + "format": "", + "primaryKey": false, + "relationshipType": "Foreign Key", + "parentRelationship": "dda294d0-84b8-11ea-8f4d-0b62bb8cf8ca", + "childRelationships": [], + "foreignCollection": "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "foreignField": [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "fa469f60-7fb2-11ea-ba73-c97a35e85484" + ], + "sample": "", + "GUID": "ade31210-84b8-11ea-8f4d-0b62bb8cf8ca", + "name": "userId", + "code": "", + "description": "Reference to the user's _id.\n\nThis will be present only if the user was logged in when completing the feedback.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "GUID": "e6c7e3d0-84b8-11ea-8f4d-0b62bb8cf8ca", + "type": "reference", + "name": "location", + "$ref": "#model/definitions/location", + "refType": "model", + "ref": "efec52d4-7fb2-11ea-ba73-c97a35e85484", + "refIdPath": [ + "6b45e040-7fae-11ea-ba73-c97a35e85484", + "6b460750-7fae-11ea-ba73-c97a35e85484", + "efec52d4-7fb2-11ea-ba73-c97a35e85484" + ], + "required": false, + "code": "", + "primaryKey": false + } + ], + "definitions": { + "type": "definitions", + "properties": [], + "GUID": "05214710-84b7-11ea-8f4d-0b62bb8cf8ca" + }, + "capped": false, + "validationLevel": "Off", + "validationAction": "Warn", + "size": "", + "max": "", + "storageEngineName": "WiredTiger", + "collectionUsers": [], + "indexes": [], + "collation": {}, + "sharding": { + "key": "", + "hashed": false, + "unique": true, + "numInitialChunks": "", + "collation": "null", + "zone": "", + "comments": "" + }, + "bucketId": "bd396b90-7fb0-11ea-ba73-c97a35e85484", + "hackoladeMeta": { + "validationErrors": {} + } + }, + { + "GUID": "88a1c9f0-efa8-11ea-a722-4d53fdda74f6", + "collectionName": "thread", + "code": "", + "type": "object", + "description": "ObjectId that serves as primary key for the message thread.", + "comments": "", + "$schema": "", + "additionalProperties": false, + "properties": [ + { + "type": "objectId", + "format": "", + "primaryKey": true, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [ + "8ad49d90-efaa-11ea-a722-4d53fdda74f6" + ], + "foreignCollection": "", + "foreignField": [], + "sample": "", + "GUID": "e6c8e090-efa8-11ea-a722-4d53fdda74f6", + "name": "_id", + "code": "", + "description": "", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "date", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "default": "", + "format": "", + "sample": "", + "GUID": "f8e828d0-efa8-11ea-a722-4d53fdda74f6", + "name": "createdAt", + "code": "", + "description": "Timestamp with the threads's creation date", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "date", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "default": "", + "format": "", + "sample": "", + "GUID": "038e9990-efa9-11ea-a722-4d53fdda74f6", + "name": "updatedAt", + "code": "", + "description": "Timestamp with the thread's update date", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "pending", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [ + "blocked", + "accepted", + "pending", + "archived" + ], + "sample": "", + "GUID": "4f0ec160-efa9-11ea-a722-4d53fdda74f6", + "name": "status", + "code": "", + "description": "Curerent thread status, used to define archives, soft deletes and other conversation status. The statuses are:\n\n* **pending**: if the user didn't accept the message request yet\n* **blocked**: if the one of the user's blocked the other\n* **accepted**: message request was accepted and users exchange messages\n* **archived**: user archived the message thread\n", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false, + "enum": false, + "enums": [ + false, + false, + false, + false, + false + ], + "default": false + } + }, + { + "type": "array", + "properties": [ + { + "type": "document", + "primaryKey": false, + "properties": [ + { + "code": "", + "required": true, + "type": "objectId", + "name": "id", + "GUID": "adce9591-efa9-11ea-a722-4d53fdda74f6", + "primaryKey": false, + "relationshipType": "Foreign Key", + "parentRelationship": "5c7645f0-7fb3-11ea-ba73-c97a35e85484", + "foreignCollection": "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "foreignField": [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "fa469f60-7fb2-11ea-ba73-c97a35e85484" + ], + "childRelationships": [], + "format": "", + "sample": "", + "description": "Foreign key to the user who created the post.", + "comments": "", + "dependencies": [], + "id": "", + "error": {}, + "hackoladeMeta": {} + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "adce9593-efa9-11ea-a722-4d53fdda74f6", + "name": "name", + "code": "", + "description": "User's name", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "adce9594-efa9-11ea-a722-4d53fdda74f6", + "name": "type", + "code": "", + "description": "User's type", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "boolean", + "default": "false", + "enum": [], + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "sample": "", + "GUID": "b7b90950-efa9-11ea-a722-4d53fdda74f6", + "name": "newMessages", + "code": "", + "description": "Flag to indicate whether there are new messages since last time the user accessed the thread.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "default": false, + "name": false + } + }, + { + "type": "date", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "default": "", + "format": "", + "sample": "", + "GUID": "a8b9b700-efaf-11ea-a722-4d53fdda74f6", + "name": "lastAccess", + "code": "", + "description": "Timestamp with the last time the user accessed the message thread.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "uri", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "eb4659e0-f570-11ea-bd96-cde8cae0469c", + "name": "photo", + "code": "", + "description": "URL with the user photo", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + } + ], + "dependencies": [], + "minProperties": "", + "maxProperties": "", + "additionalProperties": false, + "enum": [], + "GUID": "aaa9fd00-efa9-11ea-a722-4d53fdda74f6", + "code": "", + "description": "", + "comments": "", + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + }, + "parentRelationship": "", + "childRelationships": [], + "arrayItem": true + } + ], + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "additionalItems": true, + "minItems": 2, + "maxItems": "", + "uniqueItems": false, + "enum": [], + "GUID": "79ee8e10-efa9-11ea-a722-4d53fdda74f6", + "name": "participants", + "code": "", + "description": "Array of user reference's, containing the participants of the message thread.\n\nIt is modelled as an array to allow expansion to group chats in the future.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false, + "minItems": false + } + } + ], + "definitions": { + "type": "definitions", + "properties": [], + "GUID": "88a46200-efa8-11ea-a722-4d53fdda74f6" + }, + "capped": false, + "validationLevel": "Off", + "validationAction": "Warn", + "size": "", + "max": "", + "storageEngineName": "WiredTiger", + "collectionUsers": [], + "indexes": [], + "collation": {}, + "sharding": { + "key": "", + "hashed": false, + "unique": true, + "numInitialChunks": "", + "collation": "null", + "zone": "", + "comments": "" + }, + "bucketId": "bd396b90-7fb0-11ea-ba73-c97a35e85484", + "hackoladeMeta": { + "validationErrors": { + "collectionName": false + } + } + }, + { + "GUID": "da312720-efa8-11ea-a722-4d53fdda74f6", + "collectionName": "messages", + "code": "", + "type": "object", + "description": "Message sent in a private conversation\n", + "comments": "", + "$schema": "", + "additionalProperties": false, + "properties": [ + { + "type": "objectId", + "format": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "sample": "", + "GUID": "3e9cbe80-efaa-11ea-a722-4d53fdda74f6", + "name": "_id", + "code": "", + "description": "ObjectId used as primary key for a message", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "date", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "default": "", + "format": "", + "sample": "", + "GUID": "5df35b90-efaa-11ea-a722-4d53fdda74f6", + "name": "createdAt", + "code": "", + "description": "Timestamp with message's creation date", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {} + }, + { + "type": "date", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "default": "", + "format": "", + "sample": "", + "GUID": "65208410-efaa-11ea-a722-4d53fdda74f6", + "name": "updatedAt", + "code": "", + "description": "Timestamp with message's update date", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "objectId", + "format": "", + "primaryKey": false, + "relationshipType": "Foreign Key", + "parentRelationship": "1cc36b20-f571-11ea-bd96-cde8cae0469c", + "childRelationships": [], + "foreignCollection": "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "foreignField": [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "fa469f60-7fb2-11ea-ba73-c97a35e85484" + ], + "sample": "", + "GUID": "16b917c0-f571-11ea-bd96-cde8cae0469c", + "name": "authorId", + "code": "", + "description": "ObjectId of the user who sent the message", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "70677a90-efaa-11ea-a722-4d53fdda74f6", + "name": "content", + "code": "", + "description": "Messages content, containing html links and emojis ", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "objectId", + "format": "", + "primaryKey": false, + "relationshipType": "Foreign Key", + "parentRelationship": "8ad49d90-efaa-11ea-a722-4d53fdda74f6", + "childRelationships": [], + "foreignCollection": "88a1c9f0-efa8-11ea-a722-4d53fdda74f6", + "foreignField": [ + "88a1c9f0-efa8-11ea-a722-4d53fdda74f6", + "e6c8e090-efa8-11ea-a722-4d53fdda74f6" + ], + "sample": "", + "GUID": "8340c400-efaa-11ea-a722-4d53fdda74f6", + "name": "threadId", + "code": "", + "description": "Reference to the thread were the message was sent", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "sent", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [ + "edited", + "deleted", + "sent" + ], + "sample": "", + "GUID": "aa756300-efaa-11ea-a722-4d53fdda74f6", + "name": "status", + "code": "", + "description": "Curerent message status, used to define if it was edited or deleted:\n\n* **sent**: message was sent and not edited or deleted.\n* **edited**: message was edited by the author\n* **deleted**: message was deleted by the author", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false, + "enum": false, + "enums": [ + false, + false, + false + ], + "default": false + } + }, + { + "GUID": "be42a860-efb5-11ea-a722-4d53fdda74f6", + "name": "postRef", + "type": "reference", + "$ref": "#model/definitions/postRef", + "refType": "model", + "ref": "d117efa0-efb4-11ea-a722-4d53fdda74f6", + "refIdPath": [ + "6b45e040-7fae-11ea-ba73-c97a35e85484", + "6b460750-7fae-11ea-ba73-c97a35e85484", + "d117efa0-efb4-11ea-a722-4d53fdda74f6" + ], + "required": false, + "code": "", + "primaryKey": false, + "foreignCollection": "", + "foreignField": [], + "relationshipType": "", + "hackoladeMeta": {}, + "error": {} + } + ], + "definitions": { + "type": "definitions", + "properties": [], + "GUID": "da334a00-efa8-11ea-a722-4d53fdda74f6" + }, + "capped": false, + "validationLevel": "Off", + "validationAction": "Warn", + "size": "", + "max": "", + "storageEngineName": "WiredTiger", + "collectionUsers": [], + "indexes": [], + "collation": {}, + "sharding": { + "key": "", + "hashed": false, + "unique": true, + "numInitialChunks": "", + "collation": "null", + "zone": "", + "comments": "" + }, + "bucketId": "bd396b90-7fb0-11ea-ba73-c97a35e85484", + "hackoladeMeta": { + "validationErrors": { + "collectionName": false + } + } + } + ], + "buckets": [ + { + "GUID": "bd396b90-7fb0-11ea-ba73-c97a35e85484", + "name": "applicationDB", + "code": "", + "type": "bucket", + "description": "", + "comments": "", + "collectionIds": [ + "bd34fec0-7fb0-11ea-ba73-c97a35e85484", + "96933f00-7fb2-11ea-ba73-c97a35e85484", + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "05136460-84b7-11ea-8f4d-0b62bb8cf8ca", + "88a1c9f0-efa8-11ea-a722-4d53fdda74f6", + "da312720-efa8-11ea-a722-4d53fdda74f6" + ], + "backgroundColor": { + "r": 156, + "g": 40, + "b": 177, + "a": 1 + }, + "show": true, + "hackoladeMeta": { + "validationErrors": { + "name": false + } + } + } + ], + "views": [], + "relationships": [ + { + "GUID": "c11beb00-7fb2-11ea-ba73-c97a35e85484", + "name": "PostHasComments", + "description": "Relationship between a Post and it's respective Comments made at it.", + "comments": "", + "relationshipType": "Foreign Key", + "parentCollection": "96933f00-7fb2-11ea-ba73-c97a35e85484", + "parentField": [ + [ + "96933f00-7fb2-11ea-ba73-c97a35e85484", + "ae4f24b0-7fb2-11ea-ba73-c97a35e85484" + ] + ], + "parentCardinality": "1", + "childCollection": "bd34fec0-7fb0-11ea-ba73-c97a35e85484", + "childField": [ + [ + "bd34fec0-7fb0-11ea-ba73-c97a35e85484", + "bd359b02-7fb0-11ea-ba73-c97a35e85484" + ] + ], + "childCardinality": "n" + }, + { + "GUID": "e5f4d250-8108-11ea-a764-5d61b98a5ce8", + "name": "UserLikesComment", + "description": "Relation to represent the User's who liked a Comment. \n\nEven though this is a N-N relation, we opt to store the ids only at the Comment side as an array of _id (with the _id of the users who liked it).", + "comments": "", + "relationshipType": "Foreign Key", + "parentCollection": "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "parentField": [ + [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "fa469f60-7fb2-11ea-ba73-c97a35e85484" + ] + ], + "parentCardinality": "n", + "childCollection": "bd34fec0-7fb0-11ea-ba73-c97a35e85484", + "childField": [ + [ + "bd34fec0-7fb0-11ea-ba73-c97a35e85484", + "deadb930-8108-11ea-a764-5d61b98a5ce8", + "deb75620-8108-11ea-a764-5d61b98a5ce8" + ] + ], + "childCardinality": "n" + }, + { + "GUID": "1306e850-8109-11ea-a764-5d61b98a5ce8", + "name": "UserLikesPost", + "description": "Relation to represent the User's who liked a Post. \n\nEven though this is a N-N relation, we opt to store the ids only at the Post side as an array of _id (with the _id of the users who liked it).", + "comments": "", + "relationshipType": "Foreign Key", + "parentCollection": "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "parentField": [ + [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "fa469f60-7fb2-11ea-ba73-c97a35e85484" + ] + ], + "parentCardinality": "n", + "childCollection": "96933f00-7fb2-11ea-ba73-c97a35e85484", + "childField": [ + [ + "96933f00-7fb2-11ea-ba73-c97a35e85484", + "04d0c120-8109-11ea-a764-5d61b98a5ce8", + "04dad340-8109-11ea-a764-5d61b98a5ce8" + ] + ], + "childCardinality": "n" + }, + { + "GUID": "f71e1580-82ef-11ea-821a-a1813ece7f73", + "name": "UserOwnsOrganization", + "description": "Relation between an User and an Organization created by him/her. Initially projected as 1-N, with only one User owning the Organization, it is though to later on be evolved into N-N, with many Users being able to manage the Organization with different roles.", + "comments": "", + "relationshipType": "Foreign Key", + "parentCollection": "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "parentField": [ + [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "fa469f60-7fb2-11ea-ba73-c97a35e85484" + ] + ], + "parentCardinality": "1", + "childCollection": "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "childField": [ + [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "5f2b2880-82ef-11ea-821a-a1813ece7f73", + "a43c95d0-82ef-11ea-821a-a1813ece7f73", + "09b06ae5-82f0-11ea-821a-a1813ece7f73" + ] + ], + "childCardinality": "n", + "lineSize": 2 + }, + { + "GUID": "db833600-82f1-11ea-821a-a1813ece7f73", + "name": "UserAuthorsPost", + "description": "Relation between a User and the Post created by him/her.", + "comments": "", + "relationshipType": "Foreign Key", + "parentCollection": "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "parentField": [ + [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "fa469f60-7fb2-11ea-ba73-c97a35e85484" + ] + ], + "parentCardinality": "1", + "childCollection": "96933f00-7fb2-11ea-ba73-c97a35e85484", + "childField": [ + [ + "96933f00-7fb2-11ea-ba73-c97a35e85484", + "db65c2f0-82f1-11ea-821a-a1813ece7f73", + "ce5f8570-811e-11ea-a764-5d61b98a5ce8", + "96938d21-7fb2-11ea-ba73-c97a35e85484" + ] + ], + "childCardinality": "n", + "lineSize": 2 + }, + { + "GUID": "10f59d50-82f2-11ea-821a-a1813ece7f73", + "name": "UserAuthorsComment", + "description": "", + "comments": "", + "relationshipType": "Foreign Key", + "parentCollection": "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "parentField": [ + [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "fa469f60-7fb2-11ea-ba73-c97a35e85484" + ] + ], + "parentCardinality": "1", + "childCollection": "bd34fec0-7fb0-11ea-ba73-c97a35e85484", + "childField": [ + [ + "bd34fec0-7fb0-11ea-ba73-c97a35e85484", + "e79df740-82f1-11ea-821a-a1813ece7f73", + "ce5f8570-811e-11ea-a764-5d61b98a5ce8", + "96938d21-7fb2-11ea-ba73-c97a35e85484" + ] + ], + "childCardinality": "1" + }, + { + "GUID": "17776aa0-82f2-11ea-821a-a1813ece7f73", + "name": "CommentReferencesPost", + "description": "", + "comments": "", + "relationshipType": "Foreign Key", + "parentCollection": "bd34fec0-7fb0-11ea-ba73-c97a35e85484", + "parentField": [ + [ + "bd34fec0-7fb0-11ea-ba73-c97a35e85484", + "e5c2c520-7fb0-11ea-ba73-c97a35e85484" + ] + ], + "parentCardinality": "1", + "childCollection": "bd34fec0-7fb0-11ea-ba73-c97a35e85484", + "childField": [ + [ + "bd34fec0-7fb0-11ea-ba73-c97a35e85484", + "bd359b01-7fb0-11ea-ba73-c97a35e85484" + ] + ], + "childCardinality": "1" + }, + { + "GUID": "dda294d0-84b8-11ea-8f4d-0b62bb8cf8ca", + "name": "UserGivesFeedback", + "description": "", + "comments": "", + "relationshipType": "Foreign Key", + "parentCollection": "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "parentField": [ + [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "fa469f60-7fb2-11ea-ba73-c97a35e85484" + ] + ], + "parentCardinality": "1", + "childCollection": "05136460-84b7-11ea-8f4d-0b62bb8cf8ca", + "childField": [ + [ + "05136460-84b7-11ea-8f4d-0b62bb8cf8ca", + "ade31210-84b8-11ea-8f4d-0b62bb8cf8ca" + ] + ], + "childCardinality": "1" + }, + { + "GUID": "8ad49d90-efaa-11ea-a722-4d53fdda74f6", + "name": "ThreadHasMessages", + "description": "", + "comments": "", + "relationshipType": "Foreign Key", + "parentCollection": "88a1c9f0-efa8-11ea-a722-4d53fdda74f6", + "parentField": [ + [ + "88a1c9f0-efa8-11ea-a722-4d53fdda74f6", + "e6c8e090-efa8-11ea-a722-4d53fdda74f6" + ] + ], + "parentCardinality": "1", + "childCollection": "da312720-efa8-11ea-a722-4d53fdda74f6", + "childField": [ + [ + "da312720-efa8-11ea-a722-4d53fdda74f6", + "8340c400-efaa-11ea-a722-4d53fdda74f6" + ] + ], + "childCardinality": "1" + }, + { + "GUID": "1cc36b20-f571-11ea-bd96-cde8cae0469c", + "name": "UserSentMessage", + "description": "", + "comments": "", + "relationshipType": "Foreign Key", + "parentCollection": "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "parentField": [ + [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "fa469f60-7fb2-11ea-ba73-c97a35e85484" + ] + ], + "parentCardinality": "1", + "childCollection": "da312720-efa8-11ea-a722-4d53fdda74f6", + "childField": [ + [ + "da312720-efa8-11ea-a722-4d53fdda74f6", + "16b917c0-f571-11ea-bd96-cde8cae0469c" + ] + ], + "childCardinality": "1" + } + ], + "users": [], + "idToNameHashTable": { + "6d3c5910-7fae-11ea-ba73-c97a35e85484": "application_db", + "d93b54d0-7faf-11ea-ba73-c97a35e85484": "Comment.js", + "bd396b90-7fb0-11ea-ba73-c97a35e85484": "applicationDB", + "bd3573f1-7fb0-11ea-ba73-c97a35e85484": "content", + "bd363740-7fb0-11ea-ba73-c97a35e85484": "type", + "bd34fec0-7fb0-11ea-ba73-c97a35e85484": "comments", + "e5c2c520-7fb0-11ea-ba73-c97a35e85484": "_id", + "d3377f30-7fb1-11ea-ba73-c97a35e85484": "Location.js", + "e9a11b50-7fb1-11ea-ba73-c97a35e85484": "Location.js(1)", + "fee45fe0-7fb1-11ea-ba73-c97a35e85484": "Organization.js", + "969cb4e0-7fb2-11ea-ba73-c97a35e85484": "Post.js", + "9693b432-7fb2-11ea-ba73-c97a35e85484": "content", + "96933f00-7fb2-11ea-ba73-c97a35e85484": "posts", + "ae4f24b0-7fb2-11ea-ba73-c97a35e85484": "_id", + "c11beb00-7fb2-11ea-ba73-c97a35e85484": "PostHasComments", + "efee9cc0-7fb2-11ea-ba73-c97a35e85484": "User.js", + "efec04b0-7fb2-11ea-ba73-c97a35e85484": "users", + "b6239c20-80e3-11ea-a764-5d61b98a5ce8": "country", + "bd1653b0-80e3-11ea-a764-5d61b98a5ce8": "city", + "c33a2280-80e3-11ea-a764-5d61b98a5ce8": "neighborhood", + "9693b434-7fb2-11ea-ba73-c97a35e85484": "language", + "9693b43e-7fb2-11ea-ba73-c97a35e85484": "title", + "34559590-80ed-11ea-a764-5d61b98a5ce8": "objective", + "84c021d0-80ed-11ea-a764-5d61b98a5ce8": "visibility", + "d1e87b60-80ed-11ea-a764-5d61b98a5ce8": "createdAt", + "e5380640-80ed-11ea-a764-5d61b98a5ce8": "updatedAt", + "fa13d670-80ed-11ea-a764-5d61b98a5ce8": "expireAt", + "9693b43d-7fb2-11ea-ba73-c97a35e85484": "types", + "bd359b02-7fb0-11ea-ba73-c97a35e85484": "postId", + "e5f4d250-8108-11ea-a764-5d61b98a5ce8": "UserLikesComment", + "deadb930-8108-11ea-a764-5d61b98a5ce8": "likes", + "1306e850-8109-11ea-a764-5d61b98a5ce8": "UserLikesPost", + "04d0c120-8109-11ea-a764-5d61b98a5ce8": "likes", + "56741420-810c-11ea-a764-5d61b98a5ce8": "externalLinks", + "9693b433-7fb2-11ea-ba73-c97a35e85484": "appStore", + "9693b43a-7fb2-11ea-ba73-c97a35e85484": "email", + "96938d20-7fb2-11ea-ba73-c97a35e85484": "playStore", + "9693b440-7fb2-11ea-ba73-c97a35e85484": "website", + "56d2cde0-7fb7-11ea-b6ca-71d27d0acee3": "type", + "e3b342c0-8134-11ea-a764-5d61b98a5ce8": "address", + "11110b10-7fb1-11ea-ba73-c97a35e85484": "createdAt", + "19aba640-7fb1-11ea-ba73-c97a35e85484": "updatedAt", + "94f87b40-80e5-11ea-a764-5d61b98a5ce8": "urls", + "72542f40-80e4-11ea-a764-5d61b98a5ce8": "objectives", + "efa3c380-80e3-11ea-a764-5d61b98a5ce8": "needs", + "efec52d3-7fb2-11ea-ba73-c97a35e85484": "lastName", + "efec52d2-7fb2-11ea-ba73-c97a35e85484": "firstName", + "fa469f60-7fb2-11ea-ba73-c97a35e85484": "_id", + "efec52d0-7fb2-11ea-ba73-c97a35e85484": "createdAt", + "26eca310-80e5-11ea-a764-5d61b98a5ce8": "updatedAt", + "f71e1580-82ef-11ea-821a-a1813ece7f73": "UserOwnsOrganization", + "09b06ae5-82f0-11ea-821a-a1813ece7f73": "ownerId", + "09b06ae7-82f0-11ea-821a-a1813ece7f73": "name", + "09b06aea-82f0-11ea-821a-a1813ece7f73": "global", + "09b06aeb-82f0-11ea-821a-a1813ece7f73": "urls", + "09b06af5-82f0-11ea-821a-a1813ece7f73": "language", + "09b06ae4-82f0-11ea-821a-a1813ece7f73": "authId", + "09b06af3-82f0-11ea-821a-a1813ece7f73": "type", + "587bc610-82f0-11ea-821a-a1813ece7f73": "type", + "4a8675d0-80ea-11ea-a764-5d61b98a5ce8": "location", + "47c64130-80e6-11ea-a764-5d61b98a5ce8": "about", + "09b06af6-82f0-11ea-821a-a1813ece7f73": "needs", + "09b06af4-82f0-11ea-821a-a1813ece7f73": "industry", + "09b06af1-82f0-11ea-821a-a1813ece7f73": "photo", + "09b06aec-82f0-11ea-821a-a1813ece7f73": "linkedin", + "09b06aed-82f0-11ea-821a-a1813ece7f73": "twitter", + "884300a0-80e5-11ea-a764-5d61b98a5ce8": "website", + "8165cce0-80e5-11ea-a764-5d61b98a5ce8": "github", + "70e9fb70-80e5-11ea-a764-5d61b98a5ce8": "twitter", + "6dd34590-80e5-11ea-a764-5d61b98a5ce8": "linkedin", + "47f3d650-80e5-11ea-a764-5d61b98a5ce8": "facebook", + "db65c2f0-82f1-11ea-821a-a1813ece7f73": "author", + "db833600-82f1-11ea-821a-a1813ece7f73": "UserAuthorsPost", + "e79df740-82f1-11ea-821a-a1813ece7f73": "author", + "10f59d50-82f2-11ea-821a-a1813ece7f73": "UserAuthorsComment", + "bd359b01-7fb0-11ea-ba73-c97a35e85484": "parentId", + "17776aa0-82f2-11ea-821a-a1813ece7f73": "CommentReferencesPost", + "05136460-84b7-11ea-8f4d-0b62bb8cf8ca": "feedbacks", + "a408c060-84b7-11ea-8f4d-0b62bb8cf8ca": "rating", + "0cca60e0-84b8-11ea-8f4d-0b62bb8cf8ca": "ipAddress", + "975b3500-84b7-11ea-8f4d-0b62bb8cf8ca": "age", + "5128d1e0-84b8-11ea-8f4d-0b62bb8cf8ca": "mostValuableFeature", + "9a1110c0-84b8-11ea-8f4d-0b62bb8cf8ca": "whatWouldChange", + "a4e177b0-84b8-11ea-8f4d-0b62bb8cf8ca": "generalFeedback", + "ade31210-84b8-11ea-8f4d-0b62bb8cf8ca": "userId", + "dda294d0-84b8-11ea-8f4d-0b62bb8cf8ca": "UserGivesFeedback", + "e6c7e3d0-84b8-11ea-8f4d-0b62bb8cf8ca": "location", + "f5f897a0-84b8-11ea-8f4d-0b62bb8cf8ca": "covidImpact", + "3d427ab0-84b7-11ea-8f4d-0b62bb8cf8ca": "_id", + "939a9470-84c0-11ea-929b-770c2f9d8801": "createdAt", + "97510cc0-84c0-11ea-929b-770c2f9d8801": "updatedAt", + "553729a1-8bc8-11ea-8bf8-cf9318f71002": "subschema", + "efec52d1-7fb2-11ea-ba73-c97a35e85484": "email", + "720aec60-8bc8-11ea-8bf8-cf9318f71002": "phone", + "96938d21-7fb2-11ea-ba73-c97a35e85484": "id", + "a5ed67f0-811f-11ea-a764-5d61b98a5ce8": "name", + "eb7fe190-811e-11ea-a764-5d61b98a5ce8": "type", + "88a1c9f0-efa8-11ea-a722-4d53fdda74f6": "thread", + "da312720-efa8-11ea-a722-4d53fdda74f6": "messages", + "e6c8e090-efa8-11ea-a722-4d53fdda74f6": "_id", + "038e9990-efa9-11ea-a722-4d53fdda74f6": "updatedAt", + "79ee8e10-efa9-11ea-a722-4d53fdda74f6": "participants", + "5df35b90-efaa-11ea-a722-4d53fdda74f6": "createdAt", + "8340c400-efaa-11ea-a722-4d53fdda74f6": "threadId", + "8ad49d90-efaa-11ea-a722-4d53fdda74f6": "ThreadHasMessages", + "a8b9b700-efaf-11ea-a722-4d53fdda74f6": "lastAccess", + "d117efa0-efb4-11ea-a722-4d53fdda74f6": "postRef", + "dd9961f0-efb4-11ea-a722-4d53fdda74f6": "id", + "780bf4f0-efb5-11ea-a722-4d53fdda74f6": "objective", + "93978040-efb5-11ea-a722-4d53fdda74f6": "title", + "992e2a40-efb5-11ea-a722-4d53fdda74f6": "content", + "b6ab7370-efb5-11ea-a722-4d53fdda74f6": "author", + "f8e828d0-efa8-11ea-a722-4d53fdda74f6": "createdAt", + "3e9cbe80-efaa-11ea-a722-4d53fdda74f6": "_id", + "65208410-efaa-11ea-a722-4d53fdda74f6": "updatedAt", + "aa756300-efaa-11ea-a722-4d53fdda74f6": "status", + "be42a860-efb5-11ea-a722-4d53fdda74f6": "postRef", + "4f0ec160-efa9-11ea-a722-4d53fdda74f6": "status", + "b7b90950-efa9-11ea-a722-4d53fdda74f6": "newMessages", + "70677a90-efaa-11ea-a722-4d53fdda74f6": "content", + "eb4659e0-f570-11ea-bd96-cde8cae0469c": "photo", + "1cc36b20-f571-11ea-bd96-cde8cae0469c": "UserSentMessage", + "16b917c0-f571-11ea-bd96-cde8cae0469c": "authorId" + }, + "definitions": { + "type": "definitions", + "properties": [ + { + "type": "document", + "primaryKey": false, + "properties": [ + { + "type": "array", + "properties": [ + { + "type": "numeric", + "mode": "", + "unit": "degrees", + "minimum": -180, + "exclusiveMinimum": false, + "maximum": 180, + "exclusiveMaximum": false, + "multipleOf": "", + "divisibleBy": "", + "default": 0, + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": 35.26, + "GUID": "d16bf4b0-7fb6-11ea-b6ca-71d27d0acee3", + "description": "Location longitude\n", + "comments": "", + "required": false, + "id": "lng", + "hackoladeMeta": {}, + "arrayItem": true, + "arrayParentType": "array", + "error": {}, + "dependencies": [ + "e15cc430-7fb6-11ea-b6ca-71d27d0acee3" + ] + }, + { + "type": "numeric", + "mode": "", + "unit": "degrees", + "minimum": -90, + "exclusiveMinimum": false, + "maximum": 90, + "exclusiveMaximum": false, + "multipleOf": "", + "divisibleBy": "", + "default": 0, + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": -32.83, + "GUID": "e15cc430-7fb6-11ea-b6ca-71d27d0acee3", + "code": "", + "description": "Location latitude\n", + "comments": "", + "dependencies": [], + "required": false, + "id": "lat", + "hackoladeMeta": {}, + "arrayItem": true, + "error": {} + } + ], + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "additionalItems": true, + "minItems": 2, + "maxItems": 2, + "uniqueItems": false, + "enum": [], + "GUID": "d15d27a0-7fb6-11ea-b6ca-71d27d0acee3", + "name": "coordinates", + "code": "", + "description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [ + "Point" + ], + "sample": "", + "GUID": "56d2cde0-7fb7-11ea-b6ca-71d27d0acee3", + "name": "type", + "code": "", + "description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "b6239c20-80e3-11ea-a764-5d61b98a5ce8", + "name": "country", + "code": "", + "description": "String holding the country's name.\n", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "bd1653b0-80e3-11ea-a764-5d61b98a5ce8", + "name": "city", + "code": "", + "description": "String holding the city's name.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "c33a2280-80e3-11ea-a764-5d61b98a5ce8", + "name": "neighborhood", + "code": "", + "description": "String holding the neighborhood's name.", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "e3b342c0-8134-11ea-a764-5d61b98a5ce8", + "name": "address", + "code": "", + "description": "String holding the address (street, number and other details).", + "comments": "", + "dependencies": [], + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": {} + } + ], + "dependencies": [], + "minProperties": "", + "maxProperties": "", + "additionalProperties": false, + "enum": [], + "GUID": "efec52d4-7fb2-11ea-ba73-c97a35e85484", + "name": "location", + "code": "", + "description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.", + "comments": "", + "required": false, + "id": "", + "hackoladeMeta": {}, + "error": {}, + "definitionRefs": [ + [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "4a8675d0-80ea-11ea-a764-5d61b98a5ce8" + ], + [ + "96933f00-7fb2-11ea-ba73-c97a35e85484", + "ce5f8570-811e-11ea-a764-5d61b98a5ce8", + "e2868490-811e-11ea-a764-5d61b98a5ce8" + ], + [ + "05136460-84b7-11ea-8f4d-0b62bb8cf8ca", + "e6c7e3d0-84b8-11ea-8f4d-0b62bb8cf8ca" + ] + ] + }, + { + "type": "document", + "primaryKey": false, + "properties": [ + { + "code": "", + "required": true, + "type": "objectId", + "name": "id", + "GUID": "96938d21-7fb2-11ea-ba73-c97a35e85484", + "primaryKey": false, + "relationshipType": "Foreign Key", + "parentRelationship": "5c7645f0-7fb3-11ea-ba73-c97a35e85484", + "foreignCollection": "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "foreignField": [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "fa469f60-7fb2-11ea-ba73-c97a35e85484" + ], + "childRelationships": [], + "format": "", + "sample": "", + "description": "Foreign key to the user who created the post.", + "comments": "", + "dependencies": [], + "id": "", + "error": {}, + "hackoladeMeta": {} + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "a5ed67f0-811f-11ea-a764-5d61b98a5ce8", + "name": "name", + "code": "", + "description": "", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [], + "sample": "", + "GUID": "eb7fe190-811e-11ea-a764-5d61b98a5ce8", + "name": "type", + "code": "", + "description": "", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "GUID": "e2868490-811e-11ea-a764-5d61b98a5ce8", + "type": "reference", + "name": "location", + "$ref": "#model/definitions/location", + "refType": "model", + "ref": "efec52d4-7fb2-11ea-ba73-c97a35e85484", + "refIdPath": [ + "6b45e040-7fae-11ea-ba73-c97a35e85484", + "6b460750-7fae-11ea-ba73-c97a35e85484", + "efec52d4-7fb2-11ea-ba73-c97a35e85484" + ], + "required": true, + "code": "", + "primaryKey": false + } + ], + "dependencies": [], + "minProperties": "", + "maxProperties": "", + "additionalProperties": false, + "enum": [], + "GUID": "ce5f8570-811e-11ea-a764-5d61b98a5ce8", + "name": "author", + "code": "", + "description": "", + "comments": "", + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + }, + "definitionRefs": [ + [ + "96933f00-7fb2-11ea-ba73-c97a35e85484", + "db65c2f0-82f1-11ea-821a-a1813ece7f73" + ], + [ + "bd34fec0-7fb0-11ea-ba73-c97a35e85484", + "e79df740-82f1-11ea-821a-a1813ece7f73" + ], + [ + "6b45e040-7fae-11ea-ba73-c97a35e85484", + "6b460750-7fae-11ea-ba73-c97a35e85484", + "d117efa0-efb4-11ea-a722-4d53fdda74f6", + "b6ab7370-efb5-11ea-a722-4d53fdda74f6" + ] + ] + }, + { + "type": "document", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "properties": [ + { + "type": "objectId", + "format": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "sample": "", + "GUID": "dd9961f0-efb4-11ea-a722-4d53fdda74f6", + "name": "id", + "code": "", + "description": "", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "name": false + } + }, + { + "type": "string", + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "childRelationships": [], + "foreignCollection": "", + "foreignField": [], + "enum": [ + "request", + "offer" + ], + "sample": "offer", + "GUID": "780bf4f0-efb5-11ea-a722-4d53fdda74f6", + "name": "objective", + "code": "", + "description": "Field to indicate the post's objective.\nCurrently only two values allowed: \"offering help\" and \"looking for help\".", + "comments": "", + "dependencies": [], + "required": true, + "id": "", + "hackoladeMeta": {}, + "error": { + "enum": false, + "enums": [ + false, + false + ], + "sample": false + } + }, + { + "code": "", + "required": true, + "type": "string", + "name": "title", + "GUID": "93978040-efb5-11ea-a722-4d53fdda74f6", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "enum": [], + "sample": "", + "description": "The post title.", + "comments": "", + "dependencies": [], + "id": "", + "hackoladeMeta": {}, + "error": {} + }, + { + "code": "", + "required": true, + "type": "string", + "name": "content", + "GUID": "992e2a40-efb5-11ea-a722-4d53fdda74f6", + "primaryKey": false, + "relationshipType": "", + "parentRelationship": "", + "foreignCollection": "", + "foreignField": [], + "childRelationships": [], + "minLength": "", + "maxLength": "", + "pattern": "", + "format": "", + "default": "", + "enum": [], + "sample": "", + "description": "String for the post content.", + "comments": "", + "dependencies": [], + "id": "", + "error": {} + }, + { + "GUID": "b6ab7370-efb5-11ea-a722-4d53fdda74f6", + "name": "author", + "type": "reference", + "$ref": "#model/definitions/author", + "refType": "model", + "ref": "ce5f8570-811e-11ea-a764-5d61b98a5ce8", + "refIdPath": [ + "6b45e040-7fae-11ea-ba73-c97a35e85484", + "6b460750-7fae-11ea-ba73-c97a35e85484", + "ce5f8570-811e-11ea-a764-5d61b98a5ce8" + ], + "required": true, + "code": "", + "primaryKey": false + } + ], + "dependencies": [], + "minProperties": "", + "maxProperties": "", + "additionalProperties": false, + "enum": [], + "GUID": "d117efa0-efb4-11ea-a722-4d53fdda74f6", + "name": "postRef", + "code": "", + "description": "Optional post reference, allowing a post to be referenced in a message thread.", + "comments": "", + "required": false, + "id": "", + "hackoladeMeta": {}, + "definitionRefs": [ + [ + "da312720-efa8-11ea-a722-4d53fdda74f6", + "be42a860-efb5-11ea-a722-4d53fdda74f6" + ] + ], + "error": { + "name": false + } + } + ], + "GUID": "6b460750-7fae-11ea-ba73-c97a35e85484" + }, + "externalDefinitions": { + "type": "externalDefinitions", + "properties": [], + "GUID": "6b460751-7fae-11ea-ba73-c97a35e85484" + }, + "decorativeSymbols": [], + "dbVersion": "v4.2", + "dbVendor": "MongoDB", + "hideModelViews": true, + "appTarget": "MONGODB", + "creationTS": "2020-04-16T06:49:28.900Z", + "hackoladeMeta": { + "validationErrors": { + "code": false + } + }, + "isCreatedByPlugin": true, + "pluginInformation": { + "pluginEngineVersion": "1.0.0" + }, + "applicationInformation": { + "version": "4.2.0" + }, + "settings": { + "centralPane": { + "dbLevel": { + "erd": [ + { + "GUID": "bd34fec0-7fb0-11ea-ba73-c97a35e85484", + "x": 401.78396964453475, + "y": 973.479274540822, + "width": 279, + "height": 324, + "color": { + "hsl": { + "h": 290.8029197080292, + "s": 0.631336405529954, + "l": 0.42549019607843136, + "a": 1 + }, + "hex": "#9c28b1", + "rgb": { + "r": 156, + "g": 40, + "b": 177, + "a": 1 + }, + "hsv": { + "h": 290.8029197080292, + "s": 0.7740112994350282, + "v": 0.6941176470588235, + "a": 1 + }, + "oldHue": 187.04225352112678, + "source": "hex" + } + }, + { + "GUID": "96933f00-7fb2-11ea-ba73-c97a35e85484", + "x": 914.1064499034167, + "y": 384.8734102336578, + "width": 236, + "height": 366, + "color": { + "hsl": { + "h": 206.57142857142858, + "s": 0.8974358974358974, + "l": 0.5411764705882353, + "a": 1 + }, + "hex": "#2196f3", + "rgb": { + "r": 33, + "g": 150, + "b": 243, + "a": 1 + }, + "hsv": { + "h": 206.57142857142858, + "s": 0.8641975308641976, + "v": 0.9529411764705882, + "a": 1 + }, + "oldHue": 206.57142857142858, + "source": "hex" + } + }, + { + "GUID": "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "x": 396.0025658084545, + "y": 80, + "width": 347, + "height": 786, + "color": { + "hsl": { + "h": 339.7058823529412, + "s": 0.8292682926829267, + "l": 0.5176470588235293, + "a": 1 + }, + "hex": "#ea1e63", + "rgb": { + "r": 234, + "g": 30, + "b": 99, + "a": 1 + }, + "hsv": { + "h": 339.7058823529412, + "s": 0.8717948717948718, + "v": 0.9176470588235294, + "a": 1 + }, + "oldHue": 339.7058823529412, + "source": "hex" + } + }, + { + "GUID": "05136460-84b7-11ea-8f4d-0b62bb8cf8ca", + "x": 80, + "y": 396.7527358769597, + "width": 284, + "height": 310, + "color": { + "hsl": { + "h": 45.18218623481781, + "s": 0.9919678714859438, + "l": 0.5117647058823529, + "a": 1 + }, + "hex": "#fec107", + "rgb": { + "r": 254, + "g": 193, + "b": 7, + "a": 1 + }, + "hsv": { + "h": 45.18218623481781, + "s": 0.9724409448818897, + "v": 0.996078431372549, + "a": 1 + }, + "oldHue": 206.57142857142858, + "source": "hex" + } + }, + { + "GUID": "88a1c9f0-efa8-11ea-a722-4d53fdda74f6", + "x": 1279.144643191476, + "y": 487.7155300718321, + "width": 251, + "height": 198, + "color": { + "hsl": { + "h": 0, + "s": 0, + "l": 0.2, + "a": 1 + }, + "hex": "#333333", + "rgb": { + "r": 51, + "g": 51, + "b": 51, + "a": 1 + }, + "hsv": { + "h": 0, + "s": 0, + "v": 0.2, + "a": 1 + }, + "oldHue": 0, + "source": "hex" + } + }, + { + "GUID": "da312720-efa8-11ea-a722-4d53fdda74f6", + "x": 1313.5523390468857, + "y": 147, + "width": 231, + "height": 211, + "color": { + "hsl": { + "h": 15, + "s": 0.24742268041237114, + "l": 0.3803921568627451, + "a": 1 + }, + "hex": "#795549", + "rgb": { + "r": 121, + "g": 85, + "b": 73, + "a": 1 + }, + "hsv": { + "h": 15, + "s": 0.39669421487603307, + "v": 0.4745098039215686, + "a": 1 + }, + "oldHue": 290.8029197080292, + "source": "hex" + } + } + ], + "buckets": [ + { + "x": 40, + "y": 40, + "GUID": "bd396b90-7fb0-11ea-ba73-c97a35e85484" + } + ], + "collapsedNodes": [ + "bd3573f2-7fb0-11ea-ba73-c97a35e85484", + "c3a69f70-7fb0-11ea-ba73-c97a35e85484", + "fede938b-7fb1-11ea-ba73-c97a35e85484", + "9693b430-7fb2-11ea-ba73-c97a35e85484", + "da312720-efa8-11ea-a722-4d53fdda74f6967091e0-efaa-11ea-a722-4d53fdda74f6ce5f8570-811e-11ea-a764-5d61b98a5ce8e2868490-811e-11ea-a764-5d61b98a5ce8efec52d4-7fb2-11ea-ba73-c97a35e85484d15d27a0-7fb6-11ea-b6ca-71d27d0acee3", + "88a1c9f0-efa8-11ea-a722-4d53fdda74f679ee8e10-efa9-11ea-a722-4d53fdda74f6aaa9fd00-efa9-11ea-a722-4d53fdda74f6adce9595-efa9-11ea-a722-4d53fdda74f6", + "da312720-efa8-11ea-a722-4d53fdda74f6967091e0-efaa-11ea-a722-4d53fdda74f6ce5f8570-811e-11ea-a764-5d61b98a5ce8e2868490-811e-11ea-a764-5d61b98a5ce8", + "da312720-efa8-11ea-a722-4d53fdda74f6be42a860-efb5-11ea-a722-4d53fdda74f6d117efa0-efb4-11ea-a722-4d53fdda74f6b6ab7370-efb5-11ea-a722-4d53fdda74f6" + ], + "activeRelationship": "", + "selectedCollections": [], + "decorativeSymbols": [], + "graphView": { + "erd": [], + "buckets": [], + "decorativeSymbols": [], + "hideRelationshipName": false, + "showPropertiesBoxes": false, + "nameAlongTheLine": false, + "forceLayout": true, + "defaultLinkLength": 300 + }, + "activeRelationshipFields": { + "childField": [], + "parentField": [] + }, + "displayColorPicker": false, + "nestedCollectionsLayout": "horizontal" + }, + "collectionLevel": {}, + "changed": false + }, + "dtDiagram": { + "collapsedNodes": [ + [ + "6b45e040-7fae-11ea-ba73-c97a35e85484", + "6b460750-7fae-11ea-ba73-c97a35e85484", + "29268a50-80e1-11ea-a764-5d61b98a5ce8", + "1b65dfc0-7fb9-11ea-b6ca-71d27d0acee3", + "efec52d4-7fb2-11ea-ba73-c97a35e85484" + ], + [ + "96933f00-7fb2-11ea-ba73-c97a35e85484", + "9693b43f-7fb2-11ea-ba73-c97a35e85484" + ], + [ + "96933f00-7fb2-11ea-ba73-c97a35e85484", + "9693b437-7fb2-11ea-ba73-c97a35e85484" + ], + [ + "96933f00-7fb2-11ea-ba73-c97a35e85484", + "9693b439-7fb2-11ea-ba73-c97a35e85484" + ], + [ + "96933f00-7fb2-11ea-ba73-c97a35e85484", + "ce5f8570-811e-11ea-a764-5d61b98a5ce8", + "e2868490-811e-11ea-a764-5d61b98a5ce8", + "efec52d4-7fb2-11ea-ba73-c97a35e85484" + ], + [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "efa3c380-80e3-11ea-a764-5d61b98a5ce8" + ], + [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "5f2b2880-82ef-11ea-821a-a1813ece7f73", + "5f6e24f0-82ef-11ea-821a-a1813ece7f73", + "4a8675d0-80ea-11ea-a764-5d61b98a5ce8", + "efec52d4-7fb2-11ea-ba73-c97a35e85484" + ], + [ + "68a89cd0-8132-11ea-a764-5d61b98a5ce8", + "78ded9cb-8132-11ea-a764-5d61b98a5ce8" + ], + [ + "68a89cd0-8132-11ea-a764-5d61b98a5ce8", + "bf6dcc20-82ef-11ea-821a-a1813ece7f73", + "cb3e3df0-82ef-11ea-821a-a1813ece7f73" + ], + [ + "68a89cd0-8132-11ea-a764-5d61b98a5ce8", + "bf6dcc20-82ef-11ea-821a-a1813ece7f73", + "78ded9cb-8132-11ea-a764-5d61b98a5ce8" + ], + [ + "68a89cd0-8132-11ea-a764-5d61b98a5ce8", + "bf6dcc20-82ef-11ea-821a-a1813ece7f73", + "78ded9c0-8132-11ea-a764-5d61b98a5ce8" + ], + [ + "68a89cd0-8132-11ea-a764-5d61b98a5ce8", + "78deb2b5-8132-11ea-a764-5d61b98a5ce8", + "efec52d4-7fb2-11ea-ba73-c97a35e85484" + ], + [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "5f2b2880-82ef-11ea-821a-a1813ece7f73", + "a43c95d0-82ef-11ea-821a-a1813ece7f73", + "06945dd0-82f0-11ea-821a-a1813ece7f73", + "09b06ae9-82f0-11ea-821a-a1813ece7f73", + "efec52d4-7fb2-11ea-ba73-c97a35e85484" + ], + [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "5f2b2880-82ef-11ea-821a-a1813ece7f73", + "a43c95d0-82ef-11ea-821a-a1813ece7f73", + "06945dd0-82f0-11ea-821a-a1813ece7f73", + "09b06aeb-82f0-11ea-821a-a1813ece7f73" + ], + [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "5f2b2880-82ef-11ea-821a-a1813ece7f73", + "a43c95d0-82ef-11ea-821a-a1813ece7f73", + "09b06ae9-82f0-11ea-821a-a1813ece7f73", + "efec52d4-7fb2-11ea-ba73-c97a35e85484" + ], + [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "5f2b2880-82ef-11ea-821a-a1813ece7f73", + "5f6e24f0-82ef-11ea-821a-a1813ece7f73", + "72542f40-80e4-11ea-a764-5d61b98a5ce8" + ], + [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "5f2b2880-82ef-11ea-821a-a1813ece7f73", + "5f6e24f0-82ef-11ea-821a-a1813ece7f73", + "efa3c380-80e3-11ea-a764-5d61b98a5ce8" + ], + [ + "efec04b0-7fb2-11ea-ba73-c97a35e85484", + "5f2b2880-82ef-11ea-821a-a1813ece7f73", + "a43c95d0-82ef-11ea-821a-a1813ece7f73", + "09b06af6-82f0-11ea-821a-a1813ece7f73" + ], + [ + "6b45e040-7fae-11ea-ba73-c97a35e85484", + "6b460750-7fae-11ea-ba73-c97a35e85484", + "d117efa0-efb4-11ea-a722-4d53fdda74f6", + "b6ab7370-efb5-11ea-a722-4d53fdda74f6", + "ce5f8570-811e-11ea-a764-5d61b98a5ce8" + ], + [ + "da312720-efa8-11ea-a722-4d53fdda74f6", + "be42a860-efb5-11ea-a722-4d53fdda74f6", + "d117efa0-efb4-11ea-a722-4d53fdda74f6", + "b6ab7370-efb5-11ea-a722-4d53fdda74f6", + "ce5f8570-811e-11ea-a764-5d61b98a5ce8" + ], + [ + "da312720-efa8-11ea-a722-4d53fdda74f6", + "967091e0-efaa-11ea-a722-4d53fdda74f6", + "ce5f8570-811e-11ea-a764-5d61b98a5ce8", + "e2868490-811e-11ea-a764-5d61b98a5ce8", + "efec52d4-7fb2-11ea-ba73-c97a35e85484" + ], + [ + "da312720-efa8-11ea-a722-4d53fdda74f6", + "be42a860-efb5-11ea-a722-4d53fdda74f6", + "d117efa0-efb4-11ea-a722-4d53fdda74f6", + "b6ab7370-efb5-11ea-a722-4d53fdda74f6", + "ce5f8570-811e-11ea-a764-5d61b98a5ce8" + ], + [ + "88a1c9f0-efa8-11ea-a722-4d53fdda74f6", + "79ee8e10-efa9-11ea-a722-4d53fdda74f6", + "aaa9fd00-efa9-11ea-a722-4d53fdda74f6", + "adce9595-efa9-11ea-a722-4d53fdda74f6", + "efec52d4-7fb2-11ea-ba73-c97a35e85484" + ], + [ + "da312720-efa8-11ea-a722-4d53fdda74f6", + "be42a860-efb5-11ea-a722-4d53fdda74f6", + "d117efa0-efb4-11ea-a722-4d53fdda74f6", + "b6ab7370-efb5-11ea-a722-4d53fdda74f6", + "ce5f8570-811e-11ea-a764-5d61b98a5ce8" + ], + [ + "da312720-efa8-11ea-a722-4d53fdda74f6", + "967091e0-efaa-11ea-a722-4d53fdda74f6", + "ce5f8570-811e-11ea-a764-5d61b98a5ce8" + ], + [ + "da312720-efa8-11ea-a722-4d53fdda74f6", + "be42a860-efb5-11ea-a722-4d53fdda74f6", + "d117efa0-efb4-11ea-a722-4d53fdda74f6", + "b6ab7370-efb5-11ea-a722-4d53fdda74f6", + "ce5f8570-811e-11ea-a764-5d61b98a5ce8" + ] + ], + "details": true, + "hideErdDetails": false, + "shouldDistributeCollections": false + } + } +} \ No newline at end of file diff --git a/v3/docs/FightPandemics documentation.pdf b/v3/docs/FightPandemics documentation.pdf new file mode 100644 index 0000000..7a9de5c Binary files /dev/null and b/v3/docs/FightPandemics documentation.pdf differ diff --git a/v3/docs/FightPandemics.xlsx b/v3/docs/FightPandemics.xlsx new file mode 100644 index 0000000..8bf9c4a Binary files /dev/null and b/v3/docs/FightPandemics.xlsx differ diff --git a/v3/docs/FightPandemics_documentation.html b/v3/docs/FightPandemics_documentation.html new file mode 100644 index 0000000..11d9200 --- /dev/null +++ b/v3/docs/FightPandemics_documentation.html @@ -0,0 +1,2590 @@ + + + + + Hackolade + + + + + + + +
    ✕

    MongoDB Physical Model

    Schema for:

    Model name: FightPandemics
    Author: Nícolas de Araujo
    Version: 3
    File name: data_model.json
    File path: U:\home\naraujo\Dev\FightPandemics\DataModel\v3\data_model.json
    Printed On: Sun Sep 13 2020 00:33:39 GMT-0300 (Horário Padrão de Brasília)
    Created with: Hackolade - Visual data modeling for NoSQL and multimodel databases
    1. Model
    1.1 Model FightPandemics
    1.1.1 FightPandemics Entity Relationship Diagram
    1.1.2 FightPandemics Properties
    PropertyValue
    Model nameFightPandemics
    Technical nameFightPandemics
    Description
    AuthorNícolas de Araujo
    Version3
    DB vendorMongoDB
    DB versionv4.2
    Comments
    1.1.3 FightPandemics DB Definitions
    1.1.3.1 Field location
    1.1.3.1.1 location Tree Diagram
    1.1.3.1.2 location Hierarchy
    Parent field: Definitions
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    coordinatesarraytrue

    Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

    +
    typestringtrue

    Type of the GeoJSON Object. +Please refer to the official documentation for more information.

    +

    In our case, the value will always be of the type "Point".

    +
    countrystringfalse

    String holding the country's name.

    +
    citystringfalse

    String holding the city's name.

    +
    neighborhoodstringfalse

    String holding the neighborhood's name.

    +
    addressstringfalse

    String holding the address (street, number and other details).

    +
    1.1.3.1.3 location properties
    PropertyValue
    Name location
    Technical name
    Id
    Type document
    Description

    Location document according to the norms of a GeoJSON Object. +The fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    1.1.3.2 Field coordinates
    1.1.3.2.1 coordinates Tree Diagram
    1.1.3.2.2 coordinates Hierarchy
    Parent field: location
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    [0]numericfalse

    Location longitude

    +
    [1]numericfalse

    Location latitude

    +
    1.1.3.2.3 coordinates properties
    PropertyValue
    Name coordinates
    Technical name
    Id
    Type array
    Description

    Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Min items 2
    Max items 2
    Unique items false
    Additional items true
    Comments
    1.1.3.3 Field [0]
    1.1.3.3.1 [0] Tree Diagram
    1.1.3.3.2 [0] properties
    PropertyValue
    Display name
    Id lng
    Type numeric
    Subtype
    Description

    Location longitude

    +
    Dependencies
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default 0
    Unit degrees
    Min value -180
    Excl min false
    Max value 180
    Excl max false
    Multiple of
    Divisible by
    Enum
    Sample 35.26
    Comments
    1.1.3.4 Field [1]
    1.1.3.4.1 [1] Tree Diagram
    1.1.3.4.2 [1] properties
    PropertyValue
    Display name
    Id lat
    Type numeric
    Subtype
    Description

    Location latitude

    +
    Dependencies
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default 0
    Unit degrees
    Min value -90
    Excl min false
    Max value 90
    Excl max false
    Multiple of
    Divisible by
    Enum
    Sample -32.83
    Comments
    1.1.3.5 Field type
    1.1.3.5.1 type Tree Diagram
    1.1.3.5.2 type properties
    PropertyValue
    Name type
    Technical name
    Id
    Type string
    Description

    Type of the GeoJSON Object. +Please refer to the official documentation for more information.

    +

    In our case, the value will always be of the type "Point".

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum Point
    Sample
    Comments
    1.1.3.6 Field country
    1.1.3.6.1 country Tree Diagram
    1.1.3.6.2 country properties
    PropertyValue
    Name country
    Technical name
    Id
    Type string
    Description

    String holding the country's name.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    1.1.3.7 Field city
    1.1.3.7.1 city Tree Diagram
    1.1.3.7.2 city properties
    PropertyValue
    Name city
    Technical name
    Id
    Type string
    Description

    String holding the city's name.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    1.1.3.8 Field neighborhood
    1.1.3.8.1 neighborhood Tree Diagram
    1.1.3.8.2 neighborhood properties
    PropertyValue
    Name neighborhood
    Technical name
    Id
    Type string
    Description

    String holding the neighborhood's name.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    1.1.3.9 Field address
    1.1.3.9.1 address Tree Diagram
    1.1.3.9.2 address properties
    PropertyValue
    Name address
    Technical name
    Id
    Type string
    Description

    String holding the address (street, number and other details).

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    1.1.3.10 Field author
    1.1.3.10.1 author Tree Diagram
    1.1.3.10.2 author Hierarchy
    Parent field: Definitions
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    idobjectIdtruefk

    Foreign key to the user who created the post.

    +
    namestringtrue
    typestringtrue
    locationreferencetrue
    1.1.3.10.3 author properties
    PropertyValue
    Name author
    Technical name
    Id
    Type document
    Description
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    1.1.3.11 Field id
    1.1.3.11.1 id Tree Diagram
    1.1.3.11.2 id properties
    PropertyValue
    Name id
    Technical name
    Id
    Type objectId
    Description

    Foreign key to the user who created the post.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection users
    Foreign field _id
    Relationship type Foreign Key
    Default
    Sample
    Comments
    1.1.3.12 Field name
    1.1.3.12.1 name Tree Diagram
    1.1.3.12.2 name properties
    PropertyValue
    Name name
    Technical name
    Id
    Type string
    Description
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    1.1.3.13 Field type
    1.1.3.13.1 type Tree Diagram
    1.1.3.13.2 type properties
    PropertyValue
    Name type
    Technical name
    Id
    Type string
    Description
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    1.1.3.14 Field location
    1.1.3.14.1 location Tree Diagram
    1.1.3.14.2 location properties
    PropertyValue
    Name location
    Technical name
    $ref#model/definitions/location
    Reference type model
    Reference description
    1.1.3.15 Field postRef
    1.1.3.15.1 postRef Tree Diagram
    1.1.3.15.2 postRef Hierarchy
    Parent field: Definitions
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    idobjectIdtrue
    objectivestringtrue

    Field to indicate the post's objective. +Currently only two values allowed: "offering help" and "looking for help".

    +
    titlestringtrue

    The post title.

    +
    contentstringtrue

    String for the post content.

    +
    authorreferencetrue
    1.1.3.15.3 postRef properties
    PropertyValue
    Name postRef
    Technical name
    Id
    Type document
    Description

    Optional post reference, allowing a post to be referenced in a message thread.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    1.1.3.16 Field id
    1.1.3.16.1 id Tree Diagram
    1.1.3.16.2 id properties
    PropertyValue
    Name id
    Technical name
    Id
    Type objectId
    Description
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    1.1.3.17 Field objective
    1.1.3.17.1 objective Tree Diagram
    1.1.3.17.2 objective properties
    PropertyValue
    Name objective
    Technical name
    Id
    Type string
    Description

    Field to indicate the post's objective. +Currently only two values allowed: "offering help" and "looking for help".

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum request,offer
    Sample offer
    Comments
    1.1.3.18 Field title
    1.1.3.18.1 title Tree Diagram
    1.1.3.18.2 title properties
    PropertyValue
    Name title
    Technical name
    Id
    Type string
    Description

    The post title.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    1.1.3.19 Field content
    1.1.3.19.1 content Tree Diagram
    1.1.3.19.2 content properties
    PropertyValue
    Name content
    Technical name
    Id
    Type string
    Description

    String for the post content.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    1.1.3.20 Field author
    1.1.3.20.1 author Tree Diagram
    1.1.3.20.2 author properties
    PropertyValue
    Name author
    Technical name
    $ref#model/definitions/author
    Reference type model
    Reference description
    2. Databases
    2.1 Database applicationDB
    2.1.1 applicationDB Properties
    PropertyValue
    Database nameapplicationDB
    Technical name
    Enable sharding
    Description
    Comments
    2.1.2 applicationDB Collections
    2.1.2.1 Collection comments
    2.1.2.1.1 comments Tree Diagram
    2.1.2.1.2 comments Properties
    PropertyValue
    Collection namecomments
    Technical name
    Id
    Description
    DatabaseapplicationDB
    Cappedfalse
    Size
    Max
    Storage engineWiredTiger
    Config String
    Validation levelOff
    Validation actionWarn
    Additional propertiesfalse
    Comments
    2.1.2.1.3 comments Fields
    FieldTypeReqKeyDescriptionComments
    _idobjectIdtrue

    Automatically generated object_id as primary key.

    +
    createdAtdatetrue

    Timestamp with the comment's creation date

    +
    updatedAtdatetrue

    Timestamp with the comment's last update date

    +
    authordocumenttrue
    idobjectIdtrue

    Foreign key to the user who created the post.

    +
    namestringtrue
    typestringtrue
    locationdocumenttrue

    Location document according to the norms of a GeoJSON Object. +The fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.

    +
    coordinatesarraytrue

    Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

    +
    [0]numericfalse

    Location longitude

    +
    [1]numericfalse

    Location latitude

    +
    typestringtrue

    Type of the GeoJSON Object. +Please refer to the official documentation for more information.

    +

    In our case, the value will always be of the type "Point".

    +
    countrystringfalse

    String holding the country's name.

    +
    citystringfalse

    String holding the city's name.

    +
    neighborhoodstringfalse

    String holding the neighborhood's name.

    +
    addressstringfalse

    String holding the address (street, number and other details).

    +
    postIdobjectIdtrue
    parentIdobjectIdfalse

    If the comment is nested (in another comment), this field will hold the _id of the parent comment. Optional field, where being blank means it is a root comment.

    +
    contentstringtrue

    Stirng holding the comment's content.

    +
    likesarrayfalse

    Array holding the user_id of all the users who liked the comment.

    +
    [0]objectIdfalse

    _id of the user who liked the comment

    +
    2.1.2.1.3.1 Field _id
    2.1.2.1.3.1.1 _id Tree Diagram
    2.1.2.1.3.1.2 _id properties
    PropertyValue
    Name _id
    Technical name
    Id
    Type objectId
    Description

    Automatically generated object_id as primary key.

    +
    Dependencies
    Required true
    Primary key true
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.1.3.2 Field createdAt
    2.1.2.1.3.2.1 createdAt Tree Diagram
    2.1.2.1.3.2.2 createdAt properties
    PropertyValue
    Name createdAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the comment's creation date

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.1.3.3 Field updatedAt
    2.1.2.1.3.3.1 updatedAt Tree Diagram
    2.1.2.1.3.3.2 updatedAt properties
    PropertyValue
    Name updatedAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the comment's last update date

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.1.3.4 Field author
    2.1.2.1.3.4.1 author Tree Diagram
    2.1.2.1.3.4.2 author properties
    PropertyValue
    Name author
    Technical name
    $ref#model/definitions/author
    Reference type model
    Reference description
    2.1.2.1.3.5 Field postId
    2.1.2.1.3.5.1 postId Tree Diagram
    2.1.2.1.3.5.2 postId properties
    PropertyValue
    Name postId
    Technical name
    Id
    Type objectId
    Description
    Dependencies
    Required true
    Primary key false
    Foreign collection posts
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.1.3.6 Field parentId
    2.1.2.1.3.6.1 parentId Tree Diagram
    2.1.2.1.3.6.2 parentId properties
    PropertyValue
    Name parentId
    Technical name
    Id
    Type objectId
    Description

    If the comment is nested (in another comment), this field will hold the _id of the parent comment. Optional field, where being blank means it is a root comment.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection comments
    Foreign field _id
    Relationship type Foreign Key
    Default
    Sample
    Comments
    2.1.2.1.3.7 Field content
    2.1.2.1.3.7.1 content Tree Diagram
    2.1.2.1.3.7.2 content properties
    PropertyValue
    Name content
    Technical name
    Id
    Type string
    Description

    Stirng holding the comment's content.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.1.3.8 Field likes
    2.1.2.1.3.8.1 likes Tree Diagram
    2.1.2.1.3.8.2 likes Hierarchy
    Parent field: comments
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    [0]objectIdfalsefk

    _id of the user who liked the comment

    +
    2.1.2.1.3.8.3 likes properties
    PropertyValue
    Name likes
    Technical name
    Id
    Type array
    Description

    Array holding the user_id of all the users who liked the comment.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Min items
    Max items
    Unique items true
    Additional items true
    Comments
    2.1.2.1.3.9 Field [0]
    2.1.2.1.3.9.1 [0] Tree Diagram
    2.1.2.1.3.9.2 [0] properties
    PropertyValue
    Display name
    Id
    Type objectId
    Description

    _id of the user who liked the comment

    +
    Dependencies
    Primary key false
    Foreign collection
    Foreign field
    Relationship type Foreign Key
    Default
    Sample
    Comments
    2.1.2.1.4 comments Indexes
    Property New Index
    Name New Index
    Key createdAt('ascending'), parentId('ascending'), postId('ascending')
    Hashed
    Unique
    Drop duplicates
    Sparse
    Background indexing
    Partial filter exp
    Expire after (seconds)
    Storage engine WiredTiger
    Comments
    2.1.2.1.5 comments JSON Schema
    {
    +    "$schema": "http://json-schema.org/draft-04/schema#",
    +    "type": "object",
    +    "title": "comments",
    +    "additionalProperties": false,
    +    "properties": {
    +        "_id": {
    +            "type": "string",
    +            "description": "Automatically generated object_id as primary key.",
    +            "pattern": "^[a-fA-F0-9]{24}$"
    +        },
    +        "createdAt": {
    +            "type": "string",
    +            "description": "Timestamp with the comment's creation date",
    +            "format": "date-time"
    +        },
    +        "updatedAt": {
    +            "type": "string",
    +            "description": "Timestamp with the comment's last update date",
    +            "format": "date-time"
    +        },
    +        "author": {
    +            "$ref": "#model/definitions/author"
    +        },
    +        "postId": {
    +            "type": "string",
    +            "pattern": "^[a-fA-F0-9]{24}$"
    +        },
    +        "parentId": {
    +            "type": "string",
    +            "description": "If the comment is nested (in another comment), this field will hold the _id of the parent comment. Optional field, where being blank means it is a root comment.",
    +            "pattern": "^[a-fA-F0-9]{24}$"
    +        },
    +        "content": {
    +            "type": "string",
    +            "description": "Stirng holding the comment's content."
    +        },
    +        "likes": {
    +            "type": "array",
    +            "description": "Array holding the user_id of all the users who liked the comment.",
    +            "additionalItems": true,
    +            "uniqueItems": true,
    +            "items": {
    +                "type": "string",
    +                "description": "_id of the user who liked the comment",
    +                "pattern": "^[a-fA-F0-9]{24}$"
    +            }
    +        }
    +    },
    +    "required": [
    +        "_id",
    +        "createdAt",
    +        "updatedAt",
    +        "author",
    +        "postId",
    +        "content"
    +    ]
    +}
    2.1.2.1.6 comments JSON data
    {
    +    "_id": ObjectId("507f1f77bcf86cd799439011"),
    +    "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
    +    "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
    +    "author": {
    +        "id": ObjectId("507f1f77bcf86cd799439011"),
    +        "name": "Lorem",
    +        "type": "Lorem",
    +        "location": {
    +            "coordinates": [
    +                35.26,
    +                -32.83
    +            ],
    +            "type": "Point",
    +            "country": "Lorem",
    +            "city": "Lorem",
    +            "neighborhood": "Lorem",
    +            "address": "Lorem"
    +        }
    +    },
    +    "postId": ObjectId("507f1f77bcf86cd799439011"),
    +    "parentId": ObjectId("507f1f77bcf86cd799439011"),
    +    "content": "Lorem",
    +    "likes": [
    +        ObjectId("507f1f77bcf86cd799439011")
    +    ]
    +}
    2.1.2.1.7 comments Target Script
    use applicationDB;
    +
    +db.createCollection( "comments",{
    +    "storageEngine": {
    +        "wiredTiger": {}
    +    },
    +    "capped": false,
    +    "validator": {
    +        "$jsonSchema": {
    +            "bsonType": "object",
    +            "title": "comments",
    +            "additionalProperties": false,
    +            "properties": {
    +                "_id": {
    +                    "bsonType": "objectId",
    +                    "description": "Automatically generated object_id as primary key."
    +                },
    +                "createdAt": {
    +                    "bsonType": "date",
    +                    "description": "Timestamp with the comment's creation date"
    +                },
    +                "updatedAt": {
    +                    "bsonType": "date",
    +                    "description": "Timestamp with the comment's last update date"
    +                },
    +                "author": {
    +                    "bsonType": "object",
    +                    "properties": {
    +                        "id": {
    +                            "bsonType": "objectId",
    +                            "description": "Foreign key to the user who created the post."
    +                        },
    +                        "name": {
    +                            "bsonType": "string"
    +                        },
    +                        "type": {
    +                            "bsonType": "string"
    +                        },
    +                        "location": {
    +                            "bsonType": "object",
    +                            "description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.",
    +                            "properties": {
    +                                "coordinates": {
    +                                    "bsonType": "array",
    +                                    "description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.",
    +                                    "additionalItems": true,
    +                                    "minItems": 2,
    +                                    "maxItems": 2,
    +                                    "uniqueItems": false,
    +                                    "items": [
    +                                        {
    +                                            "bsonType": "number",
    +                                            "description": "Location longitude\n",
    +                                            "minimum": -180,
    +                                            "maximum": 180
    +                                        },
    +                                        {
    +                                            "bsonType": "number",
    +                                            "description": "Location latitude\n",
    +                                            "minimum": -90,
    +                                            "maximum": 90
    +                                        }
    +                                    ]
    +                                },
    +                                "type": {
    +                                    "bsonType": "string",
    +                                    "description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**",
    +                                    "enum": [
    +                                        "Point"
    +                                    ]
    +                                },
    +                                "country": {
    +                                    "bsonType": "string",
    +                                    "description": "String holding the country's name.\n"
    +                                },
    +                                "city": {
    +                                    "bsonType": "string",
    +                                    "description": "String holding the city's name."
    +                                },
    +                                "neighborhood": {
    +                                    "bsonType": "string",
    +                                    "description": "String holding the neighborhood's name."
    +                                },
    +                                "address": {
    +                                    "bsonType": "string",
    +                                    "description": "String holding the address (street, number and other details)."
    +                                }
    +                            },
    +                            "additionalProperties": false,
    +                            "required": [
    +                                "coordinates",
    +                                "type"
    +                            ]
    +                        }
    +                    },
    +                    "additionalProperties": false,
    +                    "required": [
    +                        "id",
    +                        "name",
    +                        "type"
    +                    ]
    +                },
    +                "postId": {
    +                    "bsonType": "objectId"
    +                },
    +                "parentId": {
    +                    "bsonType": "objectId",
    +                    "description": "If the comment is nested (in another comment), this field will hold the _id of the parent comment. Optional field, where being blank means it is a root comment."
    +                },
    +                "content": {
    +                    "bsonType": "string",
    +                    "description": "Stirng holding the comment's content."
    +                },
    +                "likes": {
    +                    "bsonType": "array",
    +                    "description": "Array holding the user_id of all the users who liked the comment.",
    +                    "additionalItems": true,
    +                    "uniqueItems": true,
    +                    "items": {
    +                        "bsonType": "objectId",
    +                        "description": "_id of the user who liked the comment"
    +                    }
    +                }
    +            },
    +            "required": [
    +                "_id",
    +                "createdAt",
    +                "updatedAt",
    +                "author",
    +                "postId",
    +                "content"
    +            ]
    +        }
    +    },
    +    "validationLevel": "off",
    +    "validationAction": "warn"
    +});
    +db.comments.createIndex(
    +{
    +    "createdAt": 1,
    +    "parentId": 1,
    +    "postId": 1
    +},
    +{
    +    "name": "New Index"
    +}
    +);
    2.1.2.2 Collection feedbacks
    2.1.2.2.1 feedbacks Tree Diagram
    2.1.2.2.2 feedbacks Properties
    PropertyValue
    Collection namefeedbacks
    Technical name
    Id
    Description

    Collection to hold feedback on the application.

    +

    This may be done with the user logged or not and, depending on that, we may or may not have a reference to the user in question at this model.

    +
    DatabaseapplicationDB
    Cappedfalse
    Size
    Max
    Storage engineWiredTiger
    Config String
    Validation levelOff
    Validation actionWarn
    Additional propertiesfalse
    Comments
    2.1.2.2.3 feedbacks Fields
    FieldTypeReqKeyDescriptionComments
    _idobjectIdtrue

    Automatically generated object_id as primary key.

    +
    createdAtdatetrue

    Timestamp with the feedback's creation date

    +
    updatedAtdatetrue

    Timestamp with the feedback's last update date

    +
    ratingnumerictrue

    A rating, in a scale of 1 to 5, of the application.

    +

    Currently present as: "How well does FIghtPandemics meet your needs?".

    +

    Present in the first part of the feedback and, therefore, is required.

    +
    ipAddressipv4true

    Caputred IP address in order to get user's location even if they are not logged.

    +

    Captured at the first part of the feedback and, therefore, is required.

    +
    ageinteger64false

    User's age.

    +

    Currently present as: "What is your age?".

    +

    Present in the third part of the feedback and, therefore, not required.

    +
    mostValuableFeaturestringfalse

    User's feedback into what is the features most valuable for him/her.

    +

    Currently present as: "Which features are the most valuable for you?".

    +

    Present in the second part of the feedback and, therefore, not required.

    +
    whatWouldChangestringfalse

    User's feedback into what he/she would change about the application.

    +

    Currently present as: "If you could change one thing about FightPandemics, what would it be?".

    +

    Present in the second part of the feedback and, therefore, not required.

    +
    generalFeedbackstringfalse

    User's general feedback section.

    +

    Currently present as: "Any other feedback for us?".

    +

    Present in the second part of the feedback and, therefore, not required.

    +
    covidImpactstringfalse

    User's feedback into how the COVID impacted him.

    +

    Currently present as a multiple choice question.

    +

    Question: "How has COVID-19 impacted you?"

    +

    Options:

    +
      +
    1. I go to work/school normally
    2. +
    3. I am healthy but in a stay-at-home quarentine
    4. +
    5. I have mild symptoms but haven't been tested
    6. +
    7. I am diagnosed with COVID-19
    8. +
    +

    Present in the second part of the feedback and, therefore, not required.

    +
    userIdobjectIdfalse

    Reference to the user's _id.

    +

    This will be present only if the user was logged in when completing the feedback.

    +
    locationdocumentfalse

    Location document according to the norms of a GeoJSON Object. +The fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.

    +
    coordinatesarraytrue

    Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

    +
    [0]numericfalse

    Location longitude

    +
    [1]numericfalse

    Location latitude

    +
    typestringtrue

    Type of the GeoJSON Object. +Please refer to the official documentation for more information.

    +

    In our case, the value will always be of the type "Point".

    +
    countrystringfalse

    String holding the country's name.

    +
    citystringfalse

    String holding the city's name.

    +
    neighborhoodstringfalse

    String holding the neighborhood's name.

    +
    addressstringfalse

    String holding the address (street, number and other details).

    +
    2.1.2.2.3.1 Field createdAt
    2.1.2.2.3.1.1 createdAt Tree Diagram
    2.1.2.2.3.1.2 createdAt properties
    PropertyValue
    Name createdAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the feedback's creation date

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.2.3.2 Field _id
    2.1.2.2.3.2.1 _id Tree Diagram
    2.1.2.2.3.2.2 _id properties
    PropertyValue
    Name _id
    Technical name
    Id
    Type objectId
    Description

    Automatically generated object_id as primary key.

    +
    Dependencies
    Required true
    Primary key true
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.2.3.3 Field updatedAt
    2.1.2.2.3.3.1 updatedAt Tree Diagram
    2.1.2.2.3.3.2 updatedAt properties
    PropertyValue
    Name updatedAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the feedback's last update date

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.2.3.4 Field rating
    2.1.2.2.3.4.1 rating Tree Diagram
    2.1.2.2.3.4.2 rating properties
    PropertyValue
    Name rating
    Technical name
    Id
    Type numeric
    Subtype
    Description

    A rating, in a scale of 1 to 5, of the application.

    +

    Currently present as: "How well does FIghtPandemics meet your needs?".

    +

    Present in the first part of the feedback and, therefore, is required.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Unit
    Min value 1
    Excl min false
    Max value 5
    Excl max false
    Multiple of
    Divisible by
    Enum
    Sample
    Comments
    2.1.2.2.3.5 Field ipAddress
    2.1.2.2.3.5.1 ipAddress Tree Diagram
    2.1.2.2.3.5.2 ipAddress properties
    PropertyValue
    Name ipAddress
    Technical name
    Id
    Type string
    Description

    Caputred IP address in order to get user's location even if they are not logged.

    +

    Captured at the first part of the feedback and, therefore, is required.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format ipv4
    Enum
    Sample
    Comments
    2.1.2.2.3.6 Field age
    2.1.2.2.3.6.1 age Tree Diagram
    2.1.2.2.3.6.2 age properties
    PropertyValue
    Name age
    Technical name
    Id
    Type numeric
    Subtype integer64
    Description

    User's age.

    +

    Currently present as: "What is your age?".

    +

    Present in the third part of the feedback and, therefore, not required.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Unit
    Min value 18
    Excl min false
    Max value
    Excl max false
    Multiple of
    Divisible by
    Enum
    Sample
    Comments
    2.1.2.2.3.7 Field mostValuableFeature
    2.1.2.2.3.7.1 mostValuableFeature Tree Diagram
    2.1.2.2.3.7.2 mostValuableFeature properties
    PropertyValue
    Name mostValuableFeature
    Technical name
    Id
    Type string
    Description

    User's feedback into what is the features most valuable for him/her.

    +

    Currently present as: "Which features are the most valuable for you?".

    +

    Present in the second part of the feedback and, therefore, not required.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.2.3.8 Field whatWouldChange
    2.1.2.2.3.8.1 whatWouldChange Tree Diagram
    2.1.2.2.3.8.2 whatWouldChange properties
    PropertyValue
    Name whatWouldChange
    Technical name
    Id
    Type string
    Description

    User's feedback into what he/she would change about the application.

    +

    Currently present as: "If you could change one thing about FightPandemics, what would it be?".

    +

    Present in the second part of the feedback and, therefore, not required.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.2.3.9 Field generalFeedback
    2.1.2.2.3.9.1 generalFeedback Tree Diagram
    2.1.2.2.3.9.2 generalFeedback properties
    PropertyValue
    Name generalFeedback
    Technical name
    Id
    Type string
    Description

    User's general feedback section.

    +

    Currently present as: "Any other feedback for us?".

    +

    Present in the second part of the feedback and, therefore, not required.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.2.3.10 Field covidImpact
    2.1.2.2.3.10.1 covidImpact Tree Diagram
    2.1.2.2.3.10.2 covidImpact properties
    PropertyValue
    Name covidImpact
    Technical name
    Id
    Type string
    Description

    User's feedback into how the COVID impacted him.

    +

    Currently present as a multiple choice question.

    +

    Question: "How has COVID-19 impacted you?"

    +

    Options:

    +
      +
    1. I go to work/school normally
    2. +
    3. I am healthy but in a stay-at-home quarentine
    4. +
    5. I have mild symptoms but haven't been tested
    6. +
    7. I am diagnosed with COVID-19
    8. +
    +

    Present in the second part of the feedback and, therefore, not required.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.2.3.11 Field userId
    2.1.2.2.3.11.1 userId Tree Diagram
    2.1.2.2.3.11.2 userId properties
    PropertyValue
    Name userId
    Technical name
    Id
    Type objectId
    Description

    Reference to the user's _id.

    +

    This will be present only if the user was logged in when completing the feedback.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection users
    Foreign field _id
    Relationship type Foreign Key
    Default
    Sample
    Comments
    2.1.2.2.3.12 Field location
    2.1.2.2.3.12.1 location Tree Diagram
    2.1.2.2.3.12.2 location properties
    PropertyValue
    Name location
    Technical name
    $ref#model/definitions/location
    Reference type model
    Reference description
    2.1.2.2.4 feedbacks JSON Schema
    {
    +    "$schema": "http://json-schema.org/draft-04/schema#",
    +    "type": "object",
    +    "title": "feedbacks",
    +    "description": "Collection to hold feedback on the application.\n\nThis may be done with the user logged or not and, depending on that, we may or may not have a reference to the user in question at this model.",
    +    "additionalProperties": false,
    +    "properties": {
    +        "createdAt": {
    +            "type": "string",
    +            "description": "Timestamp with the feedback's creation date",
    +            "format": "date-time"
    +        },
    +        "_id": {
    +            "type": "string",
    +            "description": "Automatically generated object_id as primary key.",
    +            "pattern": "^[a-fA-F0-9]{24}$"
    +        },
    +        "updatedAt": {
    +            "type": "string",
    +            "description": "Timestamp with the feedback's last update date",
    +            "format": "date-time"
    +        },
    +        "rating": {
    +            "type": "number",
    +            "description": "A rating, in a scale of 1 to 5, of the application.\n\nCurrently present as: \"How well does FIghtPandemics meet your needs?\".\n\nPresent in the first part of the feedback and, therefore, is required.",
    +            "minimum": 1,
    +            "maximum": 5
    +        },
    +        "ipAddress": {
    +            "type": "string",
    +            "description": "Caputred IP address in order to get user's location even if they are not logged.\n\nCaptured at the first part of the feedback and, therefore, is required.",
    +            "format": "ipv4"
    +        },
    +        "age": {
    +            "type": "integer",
    +            "description": "User's age.\n\nCurrently present as: \"What is your age?\".\n\nPresent in the third part of the feedback and, therefore, not required.",
    +            "minimum": 18
    +        },
    +        "mostValuableFeature": {
    +            "type": "string",
    +            "description": "User's feedback into what is the features most valuable for him/her.\n\nCurrently present as: \"Which features are the most valuable for you?\".\n\nPresent in the second part of the feedback and, therefore, not required."
    +        },
    +        "whatWouldChange": {
    +            "type": "string",
    +            "description": "User's feedback into what he/she would change about the application.\n\nCurrently present as: \"If you could change one thing about FightPandemics, what would it be?\".\n\nPresent in the second part of the feedback and, therefore, not required."
    +        },
    +        "generalFeedback": {
    +            "type": "string",
    +            "description": "User's general feedback section.\n\nCurrently present as: \"Any other feedback for us?\".\n\nPresent in the second part of the feedback and, therefore, not required."
    +        },
    +        "covidImpact": {
    +            "type": "string",
    +            "description": "User's feedback into how the COVID impacted him.\n\nCurrently present as a multiple choice question.\n\n**Question:** \"How has COVID-19 impacted you?\"\n\n**Options:** \n\n1. I go to work/school normally\n2. I am healthy but in a stay-at-home quarentine\n3. I have mild symptoms but haven't been tested\n4. I am diagnosed with COVID-19\n\n\nPresent in the second part of the feedback and, therefore, not required."
    +        },
    +        "userId": {
    +            "type": "string",
    +            "description": "Reference to the user's _id.\n\nThis will be present only if the user was logged in when completing the feedback.",
    +            "pattern": "^[a-fA-F0-9]{24}$"
    +        },
    +        "location": {
    +            "$ref": "#model/definitions/location"
    +        }
    +    },
    +    "required": [
    +        "createdAt",
    +        "_id",
    +        "updatedAt",
    +        "rating",
    +        "ipAddress"
    +    ]
    +}
    2.1.2.2.5 feedbacks JSON data
    {
    +    "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
    +    "_id": ObjectId("507f1f77bcf86cd799439011"),
    +    "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
    +    "rating": 1,
    +    "ipAddress": "192.168.0.1",
    +    "age": 8528994625872795000,
    +    "mostValuableFeature": "Lorem",
    +    "whatWouldChange": "Lorem",
    +    "generalFeedback": "Lorem",
    +    "covidImpact": "Lorem",
    +    "userId": ObjectId("507f1f77bcf86cd799439011"),
    +    "location": {
    +        "coordinates": [
    +            35.26,
    +            -32.83
    +        ],
    +        "type": "Point",
    +        "country": "Lorem",
    +        "city": "Lorem",
    +        "neighborhood": "Lorem",
    +        "address": "Lorem"
    +    }
    +}
    2.1.2.2.6 feedbacks Target Script
    use applicationDB;
    +
    +db.createCollection( "feedbacks",{
    +    "storageEngine": {
    +        "wiredTiger": {}
    +    },
    +    "capped": false,
    +    "validator": {
    +        "$jsonSchema": {
    +            "bsonType": "object",
    +            "title": "feedbacks",
    +            "description": "Collection to hold feedback on the application.\n\nThis may be done with the user logged or not and, depending on that, we may or may not have a reference to the user in question at this model.",
    +            "additionalProperties": false,
    +            "properties": {
    +                "_id": {
    +                    "bsonType": "objectId",
    +                    "description": "Automatically generated object_id as primary key."
    +                },
    +                "createdAt": {
    +                    "bsonType": "date",
    +                    "description": "Timestamp with the feedback's creation date"
    +                },
    +                "updatedAt": {
    +                    "bsonType": "date",
    +                    "description": "Timestamp with the feedback's last update date"
    +                },
    +                "rating": {
    +                    "bsonType": "number",
    +                    "description": "A rating, in a scale of 1 to 5, of the application.\n\nCurrently present as: \"How well does FIghtPandemics meet your needs?\".\n\nPresent in the first part of the feedback and, therefore, is required.",
    +                    "minimum": 1,
    +                    "maximum": 5
    +                },
    +                "ipAddress": {
    +                    "bsonType": "string",
    +                    "description": "Caputred IP address in order to get user's location even if they are not logged.\n\nCaptured at the first part of the feedback and, therefore, is required."
    +                },
    +                "age": {
    +                    "bsonType": "long",
    +                    "description": "User's age.\n\nCurrently present as: \"What is your age?\".\n\nPresent in the third part of the feedback and, therefore, not required.",
    +                    "minimum": 18
    +                },
    +                "mostValuableFeature": {
    +                    "bsonType": "string",
    +                    "description": "User's feedback into what is the features most valuable for him/her.\n\nCurrently present as: \"Which features are the most valuable for you?\".\n\nPresent in the second part of the feedback and, therefore, not required."
    +                },
    +                "whatWouldChange": {
    +                    "bsonType": "string",
    +                    "description": "User's feedback into what he/she would change about the application.\n\nCurrently present as: \"If you could change one thing about FightPandemics, what would it be?\".\n\nPresent in the second part of the feedback and, therefore, not required."
    +                },
    +                "generalFeedback": {
    +                    "bsonType": "string",
    +                    "description": "User's general feedback section.\n\nCurrently present as: \"Any other feedback for us?\".\n\nPresent in the second part of the feedback and, therefore, not required."
    +                },
    +                "covidImpact": {
    +                    "bsonType": "string",
    +                    "description": "User's feedback into how the COVID impacted him.\n\nCurrently present as a multiple choice question.\n\n**Question:** \"How has COVID-19 impacted you?\"\n\n**Options:** \n\n1. I go to work/school normally\n2. I am healthy but in a stay-at-home quarentine\n3. I have mild symptoms but haven't been tested\n4. I am diagnosed with COVID-19\n\n\nPresent in the second part of the feedback and, therefore, not required."
    +                },
    +                "userId": {
    +                    "bsonType": "objectId",
    +                    "description": "Reference to the user's _id.\n\nThis will be present only if the user was logged in when completing the feedback."
    +                },
    +                "location": {
    +                    "bsonType": "object",
    +                    "description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.",
    +                    "properties": {
    +                        "coordinates": {
    +                            "bsonType": "array",
    +                            "description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.",
    +                            "additionalItems": true,
    +                            "minItems": 2,
    +                            "maxItems": 2,
    +                            "uniqueItems": false,
    +                            "items": [
    +                                {
    +                                    "bsonType": "number",
    +                                    "description": "Location longitude\n",
    +                                    "minimum": -180,
    +                                    "maximum": 180
    +                                },
    +                                {
    +                                    "bsonType": "number",
    +                                    "description": "Location latitude\n",
    +                                    "minimum": -90,
    +                                    "maximum": 90
    +                                }
    +                            ]
    +                        },
    +                        "type": {
    +                            "bsonType": "string",
    +                            "description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**",
    +                            "enum": [
    +                                "Point"
    +                            ]
    +                        },
    +                        "country": {
    +                            "bsonType": "string",
    +                            "description": "String holding the country's name.\n"
    +                        },
    +                        "city": {
    +                            "bsonType": "string",
    +                            "description": "String holding the city's name."
    +                        },
    +                        "neighborhood": {
    +                            "bsonType": "string",
    +                            "description": "String holding the neighborhood's name."
    +                        },
    +                        "address": {
    +                            "bsonType": "string",
    +                            "description": "String holding the address (street, number and other details)."
    +                        }
    +                    },
    +                    "additionalProperties": false,
    +                    "required": [
    +                        "coordinates",
    +                        "type"
    +                    ]
    +                }
    +            },
    +            "required": [
    +                "createdAt",
    +                "_id",
    +                "updatedAt",
    +                "rating",
    +                "ipAddress"
    +            ]
    +        }
    +    },
    +    "validationLevel": "off",
    +    "validationAction": "warn"
    +});
    2.1.2.3 Collection messages
    2.1.2.3.1 messages Tree Diagram
    2.1.2.3.2 messages Properties
    PropertyValue
    Collection namemessages
    Technical name
    Id
    Description

    Message sent in a private conversation

    +
    DatabaseapplicationDB
    Cappedfalse
    Size
    Max
    Storage engineWiredTiger
    Config String
    Validation levelOff
    Validation actionWarn
    Additional propertiesfalse
    Comments
    2.1.2.3.3 messages Fields
    FieldTypeReqKeyDescriptionComments
    _idobjectIdtrue

    ObjectId used as primary key for a message

    +
    createdAtdatetrue

    Timestamp with message's creation date

    +
    updatedAtdatetrue

    Timestamp with message's update date

    +
    authorIdobjectIdtrue

    ObjectId of the user who sent the message

    +
    contentstringtrue

    Messages content, containing html links and emojis

    +
    threadIdobjectIdtrue

    Reference to the thread were the message was sent

    +
    statusstringtrue

    Curerent message status, used to define if it was edited or deleted:

    +
      +
    • sent: message was sent and not edited or deleted.
    • +
    • edited: message was edited by the author
    • +
    • deleted: message was deleted by the author
    • +
    +
    postRefdocumentfalse

    Optional post reference, allowing a post to be referenced in a message thread.

    +
    idobjectIdtrue
    objectivestringtrue

    Field to indicate the post's objective. +Currently only two values allowed: "offering help" and "looking for help".

    +
    titlestringtrue

    The post title.

    +
    contentstringtrue

    String for the post content.

    +
    authordocumenttrue
    idobjectIdtrue

    Foreign key to the user who created the post.

    +
    namestringtrue
    typestringtrue
    locationdocumenttrue

    Location document according to the norms of a GeoJSON Object. +The fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.

    +
    coordinatesarraytrue

    Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

    +
    [0]numericfalse

    Location longitude

    +
    [1]numericfalse

    Location latitude

    +
    typestringtrue

    Type of the GeoJSON Object. +Please refer to the official documentation for more information.

    +

    In our case, the value will always be of the type "Point".

    +
    countrystringfalse

    String holding the country's name.

    +
    citystringfalse

    String holding the city's name.

    +
    neighborhoodstringfalse

    String holding the neighborhood's name.

    +
    addressstringfalse

    String holding the address (street, number and other details).

    +
    2.1.2.3.3.1 Field _id
    2.1.2.3.3.1.1 _id Tree Diagram
    2.1.2.3.3.1.2 _id properties
    PropertyValue
    Name _id
    Technical name
    Id
    Type objectId
    Description

    ObjectId used as primary key for a message

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.3.3.2 Field createdAt
    2.1.2.3.3.2.1 createdAt Tree Diagram
    2.1.2.3.3.2.2 createdAt properties
    PropertyValue
    Name createdAt
    Technical name
    Id
    Type date
    Description

    Timestamp with message's creation date

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.3.3.3 Field updatedAt
    2.1.2.3.3.3.1 updatedAt Tree Diagram
    2.1.2.3.3.3.2 updatedAt properties
    PropertyValue
    Name updatedAt
    Technical name
    Id
    Type date
    Description

    Timestamp with message's update date

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.3.3.4 Field authorId
    2.1.2.3.3.4.1 authorId Tree Diagram
    2.1.2.3.3.4.2 authorId properties
    PropertyValue
    Name authorId
    Technical name
    Id
    Type objectId
    Description

    ObjectId of the user who sent the message

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection users
    Foreign field _id
    Relationship type Foreign Key
    Default
    Sample
    Comments
    2.1.2.3.3.5 Field content
    2.1.2.3.3.5.1 content Tree Diagram
    2.1.2.3.3.5.2 content properties
    PropertyValue
    Name content
    Technical name
    Id
    Type string
    Description

    Messages content, containing html links and emojis

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.3.3.6 Field threadId
    2.1.2.3.3.6.1 threadId Tree Diagram
    2.1.2.3.3.6.2 threadId properties
    PropertyValue
    Name threadId
    Technical name
    Id
    Type objectId
    Description

    Reference to the thread were the message was sent

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection thread
    Foreign field _id
    Relationship type Foreign Key
    Default
    Sample
    Comments
    2.1.2.3.3.7 Field status
    2.1.2.3.3.7.1 status Tree Diagram
    2.1.2.3.3.7.2 status properties
    PropertyValue
    Name status
    Technical name
    Id
    Type string
    Description

    Curerent message status, used to define if it was edited or deleted:

    +
      +
    • sent: message was sent and not edited or deleted.
    • +
    • edited: message was edited by the author
    • +
    • deleted: message was deleted by the author
    • +
    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default sent
    Min length
    Max length
    Pattern
    Format
    Enum edited,deleted,sent
    Sample
    Comments
    2.1.2.3.3.8 Field postRef
    2.1.2.3.3.8.1 postRef Tree Diagram
    2.1.2.3.3.8.2 postRef properties
    PropertyValue
    Name postRef
    Technical name
    $ref#model/definitions/postRef
    Reference type model
    Reference description
    2.1.2.3.4 messages JSON Schema
    {
    +    "$schema": "http://json-schema.org/draft-04/schema#",
    +    "type": "object",
    +    "title": "messages",
    +    "description": "Message sent in a private conversation\n",
    +    "additionalProperties": false,
    +    "properties": {
    +        "_id": {
    +            "type": "string",
    +            "description": "ObjectId used as primary key for a message",
    +            "pattern": "^[a-fA-F0-9]{24}$"
    +        },
    +        "createdAt": {
    +            "type": "string",
    +            "description": "Timestamp with message's creation date",
    +            "format": "date-time"
    +        },
    +        "updatedAt": {
    +            "type": "string",
    +            "description": "Timestamp with message's update date",
    +            "format": "date-time"
    +        },
    +        "authorId": {
    +            "type": "string",
    +            "description": "ObjectId of the user who sent the message",
    +            "pattern": "^[a-fA-F0-9]{24}$"
    +        },
    +        "content": {
    +            "type": "string",
    +            "description": "Messages content, containing html links and emojis "
    +        },
    +        "threadId": {
    +            "type": "string",
    +            "description": "Reference to the thread were the message was sent",
    +            "pattern": "^[a-fA-F0-9]{24}$"
    +        },
    +        "status": {
    +            "type": "string",
    +            "description": "Curerent message status, used to define if it was edited or deleted:\n\n* **sent**: message was sent and not edited or deleted.\n* **edited**: message was edited by the author\n* **deleted**: message was deleted by the author",
    +            "default": "sent",
    +            "enum": [
    +                "edited",
    +                "deleted",
    +                "sent"
    +            ]
    +        },
    +        "postRef": {
    +            "$ref": "#model/definitions/postRef"
    +        }
    +    },
    +    "required": [
    +        "_id",
    +        "createdAt",
    +        "updatedAt",
    +        "authorId",
    +        "content",
    +        "threadId",
    +        "status"
    +    ]
    +}
    2.1.2.3.5 messages JSON data
    {
    +    "_id": ObjectId("507f1f77bcf86cd799439011"),
    +    "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
    +    "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
    +    "authorId": ObjectId("507f1f77bcf86cd799439011"),
    +    "content": "Lorem",
    +    "threadId": ObjectId("507f1f77bcf86cd799439011"),
    +    "status": "sent",
    +    "postRef": {
    +        "id": ObjectId("507f1f77bcf86cd799439011"),
    +        "objective": "offer",
    +        "title": "Lorem",
    +        "content": "Lorem",
    +        "author": {
    +            "id": ObjectId("507f1f77bcf86cd799439011"),
    +            "name": "Lorem",
    +            "type": "Lorem",
    +            "location": {
    +                "coordinates": [
    +                    35.26,
    +                    -32.83
    +                ],
    +                "type": "Point",
    +                "country": "Lorem",
    +                "city": "Lorem",
    +                "neighborhood": "Lorem",
    +                "address": "Lorem"
    +            }
    +        }
    +    }
    +}
    2.1.2.3.6 messages Target Script
    use applicationDB;
    +
    +db.createCollection( "messages",{
    +    "storageEngine": {
    +        "wiredTiger": {}
    +    },
    +    "capped": false,
    +    "validator": {
    +        "$jsonSchema": {
    +            "bsonType": "object",
    +            "title": "messages",
    +            "description": "Message sent in a private conversation\n",
    +            "additionalProperties": false,
    +            "properties": {
    +                "_id": {
    +                    "bsonType": "objectId",
    +                    "description": "ObjectId used as primary key for a message"
    +                },
    +                "createdAt": {
    +                    "bsonType": "date",
    +                    "description": "Timestamp with message's creation date"
    +                },
    +                "updatedAt": {
    +                    "bsonType": "date",
    +                    "description": "Timestamp with message's update date"
    +                },
    +                "authorId": {
    +                    "bsonType": "objectId",
    +                    "description": "ObjectId of the user who sent the message"
    +                },
    +                "content": {
    +                    "bsonType": "string",
    +                    "description": "Messages content, containing html links and emojis "
    +                },
    +                "threadId": {
    +                    "bsonType": "objectId",
    +                    "description": "Reference to the thread were the message was sent"
    +                },
    +                "status": {
    +                    "bsonType": "string",
    +                    "description": "Curerent message status, used to define if it was edited or deleted:\n\n* **sent**: message was sent and not edited or deleted.\n* **edited**: message was edited by the author\n* **deleted**: message was deleted by the author",
    +                    "enum": [
    +                        "edited",
    +                        "deleted",
    +                        "sent"
    +                    ]
    +                },
    +                "postRef": {
    +                    "bsonType": "object",
    +                    "description": "Optional post reference, allowing a post to be referenced in a message thread.",
    +                    "properties": {
    +                        "id": {
    +                            "bsonType": "objectId"
    +                        },
    +                        "objective": {
    +                            "bsonType": "string",
    +                            "description": "Field to indicate the post's objective.\nCurrently only two values allowed: \"offering help\" and \"looking for help\".",
    +                            "enum": [
    +                                "request",
    +                                "offer"
    +                            ]
    +                        },
    +                        "title": {
    +                            "bsonType": "string",
    +                            "description": "The post title."
    +                        },
    +                        "content": {
    +                            "bsonType": "string",
    +                            "description": "String for the post content."
    +                        },
    +                        "author": {
    +                            "bsonType": "object",
    +                            "properties": {
    +                                "id": {
    +                                    "bsonType": "objectId",
    +                                    "description": "Foreign key to the user who created the post."
    +                                },
    +                                "name": {
    +                                    "bsonType": "string"
    +                                },
    +                                "type": {
    +                                    "bsonType": "string"
    +                                },
    +                                "location": {
    +                                    "bsonType": "object",
    +                                    "description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.",
    +                                    "properties": {
    +                                        "coordinates": {
    +                                            "bsonType": "array",
    +                                            "description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.",
    +                                            "additionalItems": true,
    +                                            "minItems": 2,
    +                                            "maxItems": 2,
    +                                            "uniqueItems": false,
    +                                            "items": [
    +                                                {
    +                                                    "bsonType": "number",
    +                                                    "description": "Location longitude\n",
    +                                                    "minimum": -180,
    +                                                    "maximum": 180
    +                                                },
    +                                                {
    +                                                    "bsonType": "number",
    +                                                    "description": "Location latitude\n",
    +                                                    "minimum": -90,
    +                                                    "maximum": 90
    +                                                }
    +                                            ]
    +                                        },
    +                                        "type": {
    +                                            "bsonType": "string",
    +                                            "description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**",
    +                                            "enum": [
    +                                                "Point"
    +                                            ]
    +                                        },
    +                                        "country": {
    +                                            "bsonType": "string",
    +                                            "description": "String holding the country's name.\n"
    +                                        },
    +                                        "city": {
    +                                            "bsonType": "string",
    +                                            "description": "String holding the city's name."
    +                                        },
    +                                        "neighborhood": {
    +                                            "bsonType": "string",
    +                                            "description": "String holding the neighborhood's name."
    +                                        },
    +                                        "address": {
    +                                            "bsonType": "string",
    +                                            "description": "String holding the address (street, number and other details)."
    +                                        }
    +                                    },
    +                                    "additionalProperties": false,
    +                                    "required": [
    +                                        "coordinates",
    +                                        "type"
    +                                    ]
    +                                }
    +                            },
    +                            "additionalProperties": false,
    +                            "required": [
    +                                "id",
    +                                "name",
    +                                "type"
    +                            ]
    +                        }
    +                    },
    +                    "additionalProperties": false,
    +                    "required": [
    +                        "id",
    +                        "objective",
    +                        "title",
    +                        "content",
    +                        "author"
    +                    ]
    +                }
    +            },
    +            "required": [
    +                "_id",
    +                "createdAt",
    +                "updatedAt",
    +                "authorId",
    +                "content",
    +                "threadId",
    +                "status"
    +            ]
    +        }
    +    },
    +    "validationLevel": "off",
    +    "validationAction": "warn"
    +});
    2.1.2.4 Collection posts
    2.1.2.4.1 posts Tree Diagram
    2.1.2.4.2 posts Properties
    PropertyValue
    Collection nameposts
    Technical name
    Id
    Description

    Document to represent a post, asking or offering help to be displayed on the feed

    +
    DatabaseapplicationDB
    Cappedfalse
    Size
    Max
    Storage engineWiredTiger
    Config String
    Validation levelOff
    Validation actionWarn
    Additional propertiesfalse
    Comments
    2.1.2.4.3 posts Fields
    FieldTypeReqKeyDescriptionComments
    _idobjectIdtrue
    createdAtdatetrue

    Timestamp with the post's creation date

    +
    updatedAtdatetrue

    Timestamp with the post's last update date

    +
    expireAtdatefalse

    Timestamp with the date the post will expire. +If no expiration date is present, the post does not expire.

    +
    authordocumenttrue
    idobjectIdtrue

    Foreign key to the user who created the post.

    +
    namestringtrue
    typestringtrue
    locationdocumenttrue

    Location document according to the norms of a GeoJSON Object. +The fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.

    +
    coordinatesarraytrue

    Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

    +
    [0]numericfalse

    Location longitude

    +
    [1]numericfalse

    Location latitude

    +
    typestringtrue

    Type of the GeoJSON Object. +Please refer to the official documentation for more information.

    +

    In our case, the value will always be of the type "Point".

    +
    countrystringfalse

    String holding the country's name.

    +
    citystringfalse

    String holding the city's name.

    +
    neighborhoodstringfalse

    String holding the neighborhood's name.

    +
    addressstringfalse

    String holding the address (street, number and other details).

    +
    titlestringtrue

    The post title.

    +
    contentstringtrue

    String for the post content.

    +
    objectivestringtrue

    Field to indicate the post's objective. +Currently only two values allowed: "offering help" and "looking for help".

    +
    visibilitystringtrue

    Field to specify the post's visibility. It can be: worldwide, country, state and zipcode.

    +
    likesarraytrue

    Array holding the user_id of all the users who liked the post.

    +
    [0]objectIdfalse

    _id of the user who liked the post

    +
    typesarrayfalse

    Array with the post's tags. +Can be: Medical Supplies, Groceries/Food, Business, Education, Legal, Wellbeing/Mental, Entertainment, Information, Funding, R&D and Others

    +
    [0]stringfalse
    languagearrayfalse
    [0]stringfalse
    externalLinksdocumentfalse
    emailstringfalse

    An email related to the post's content.

    +
    websitestringfalse

    Link for a website related to the post's content.

    +
    playStorestringfalse

    Link for a Play Store application related to the post's content.

    +
    appStorestringfalse

    Link for a AppStore application related to the post's content.

    +
    2.1.2.4.3.1 Field _id
    2.1.2.4.3.1.1 _id Tree Diagram
    2.1.2.4.3.1.2 _id properties
    PropertyValue
    Name _id
    Technical name
    Id
    Type objectId
    Description
    Dependencies
    Required true
    Primary key true
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.4.3.2 Field createdAt
    2.1.2.4.3.2.1 createdAt Tree Diagram
    2.1.2.4.3.2.2 createdAt properties
    PropertyValue
    Name createdAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the post's creation date

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.4.3.3 Field updatedAt
    2.1.2.4.3.3.1 updatedAt Tree Diagram
    2.1.2.4.3.3.2 updatedAt properties
    PropertyValue
    Name updatedAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the post's last update date

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.4.3.4 Field expireAt
    2.1.2.4.3.4.1 expireAt Tree Diagram
    2.1.2.4.3.4.2 expireAt properties
    PropertyValue
    Name expireAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the date the post will expire. +If no expiration date is present, the post does not expire.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.4.3.5 Field author
    2.1.2.4.3.5.1 author Tree Diagram
    2.1.2.4.3.5.2 author properties
    PropertyValue
    Name author
    Technical name
    $ref#model/definitions/author
    Reference type model
    Reference description
    2.1.2.4.3.6 Field title
    2.1.2.4.3.6.1 title Tree Diagram
    2.1.2.4.3.6.2 title properties
    PropertyValue
    Name title
    Technical name
    Id
    Type string
    Description

    The post title.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.3.7 Field content
    2.1.2.4.3.7.1 content Tree Diagram
    2.1.2.4.3.7.2 content properties
    PropertyValue
    Name content
    Technical name
    Id
    Type string
    Description

    String for the post content.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.3.8 Field objective
    2.1.2.4.3.8.1 objective Tree Diagram
    2.1.2.4.3.8.2 objective properties
    PropertyValue
    Name objective
    Technical name
    Id
    Type string
    Description

    Field to indicate the post's objective. +Currently only two values allowed: "offering help" and "looking for help".

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum request,offer
    Sample offer
    Comments
    2.1.2.4.3.9 Field visibility
    2.1.2.4.3.9.1 visibility Tree Diagram
    2.1.2.4.3.9.2 visibility properties
    PropertyValue
    Name visibility
    Technical name
    Id
    Type string
    Description

    Field to specify the post's visibility. It can be: worldwide, country, state and zipcode.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum zipcode,state,country,worldwide
    Sample
    Comments
    2.1.2.4.3.10 Field likes
    2.1.2.4.3.10.1 likes Tree Diagram
    2.1.2.4.3.10.2 likes Hierarchy
    Parent field: posts
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    [0]objectIdfalsefk

    _id of the user who liked the post

    +
    2.1.2.4.3.10.3 likes properties
    PropertyValue
    Name likes
    Technical name
    Id
    Type array
    Description

    Array holding the user_id of all the users who liked the post.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Min items
    Max items
    Unique items true
    Additional items true
    Comments
    2.1.2.4.3.11 Field [0]
    2.1.2.4.3.11.1 [0] Tree Diagram
    2.1.2.4.3.11.2 [0] properties
    PropertyValue
    Display name
    Id
    Type objectId
    Description

    _id of the user who liked the post

    +
    Dependencies
    Primary key false
    Foreign collection users
    Foreign field _id
    Relationship type Foreign Key
    Default
    Sample
    Comments
    2.1.2.4.3.12 Field types
    2.1.2.4.3.12.1 types Tree Diagram
    2.1.2.4.3.12.2 types Hierarchy
    Parent field: posts
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    [0]stringfalse
    2.1.2.4.3.12.3 types properties
    PropertyValue
    Name types
    Technical name
    Id
    Type array
    Description

    Array with the post's tags. +Can be: Medical Supplies, Groceries/Food, Business, Education, Legal, Wellbeing/Mental, Entertainment, Information, Funding, R&D and Others

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Min items
    Max items
    Unique items false
    Additional items true
    Comments
    2.1.2.4.3.13 Field [0]
    2.1.2.4.3.13.1 [0] Tree Diagram
    2.1.2.4.3.13.2 [0] properties
    PropertyValue
    Display name
    Id
    Type string
    Description
    Dependencies
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum Medical Supplies,Groceries/Food,Business,Education,Legal,Wellbeing/Mental,Entertainment,Information,Funding,R&D,Others
    Sample Groceries/Food
    Comments
    2.1.2.4.3.14 Field language
    2.1.2.4.3.14.1 language Tree Diagram
    2.1.2.4.3.14.2 language Hierarchy
    Parent field: posts
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    [0]stringfalse
    2.1.2.4.3.14.3 language properties
    PropertyValue
    Name language
    Technical name
    Id
    Type array
    Description
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Min items
    Max items
    Unique items false
    Additional items true
    Comments
    2.1.2.4.3.15 Field [0]
    2.1.2.4.3.15.1 [0] Tree Diagram
    2.1.2.4.3.15.2 [0] properties
    PropertyValue
    Display name
    Id
    Type string
    Description
    Dependencies
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.3.16 Field externalLinks
    2.1.2.4.3.16.1 externalLinks Tree Diagram
    2.1.2.4.3.16.2 externalLinks Hierarchy
    Parent field: posts
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    emailstringfalse

    An email related to the post's content.

    +
    websitestringfalse

    Link for a website related to the post's content.

    +
    playStorestringfalse

    Link for a Play Store application related to the post's content.

    +
    appStorestringfalse

    Link for a AppStore application related to the post's content.

    +
    2.1.2.4.3.16.3 externalLinks properties
    PropertyValue
    Name externalLinks
    Technical name
    Id
    Type document
    Description
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.4.3.17 Field email
    2.1.2.4.3.17.1 email Tree Diagram
    2.1.2.4.3.17.2 email properties
    PropertyValue
    Name email
    Technical name
    Id
    Type string
    Description

    An email related to the post's content.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.3.18 Field website
    2.1.2.4.3.18.1 website Tree Diagram
    2.1.2.4.3.18.2 website properties
    PropertyValue
    Name website
    Technical name
    Id
    Type string
    Description

    Link for a website related to the post's content.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.3.19 Field playStore
    2.1.2.4.3.19.1 playStore Tree Diagram
    2.1.2.4.3.19.2 playStore properties
    PropertyValue
    Name playStore
    Technical name
    Id
    Type string
    Description

    Link for a Play Store application related to the post's content.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.3.20 Field appStore
    2.1.2.4.3.20.1 appStore Tree Diagram
    2.1.2.4.3.20.2 appStore properties
    PropertyValue
    Name appStore
    Technical name
    Id
    Type string
    Description

    Link for a AppStore application related to the post's content.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.4.4 posts JSON Schema
    {
    +    "$schema": "http://json-schema.org/draft-04/schema#",
    +    "type": "object",
    +    "title": "posts",
    +    "description": "Document to represent a post, asking or offering help to be displayed on the feed",
    +    "additionalProperties": false,
    +    "properties": {
    +        "_id": {
    +            "type": "string",
    +            "pattern": "^[a-fA-F0-9]{24}$"
    +        },
    +        "createdAt": {
    +            "type": "string",
    +            "description": "Timestamp with the post's creation date",
    +            "format": "date-time"
    +        },
    +        "updatedAt": {
    +            "type": "string",
    +            "description": "Timestamp with the post's last update date",
    +            "format": "date-time"
    +        },
    +        "expireAt": {
    +            "type": "string",
    +            "description": "Timestamp with the date the post will expire.\nIf no expiration date is present, the post does not expire.",
    +            "format": "date-time"
    +        },
    +        "author": {
    +            "$ref": "#model/definitions/author"
    +        },
    +        "title": {
    +            "type": "string",
    +            "description": "The post title."
    +        },
    +        "content": {
    +            "type": "string",
    +            "description": "String for the post content."
    +        },
    +        "objective": {
    +            "type": "string",
    +            "description": "Field to indicate the post's objective.\nCurrently only two values allowed: \"offering help\" and \"looking for help\".",
    +            "enum": [
    +                "request",
    +                "offer"
    +            ]
    +        },
    +        "visibility": {
    +            "type": "string",
    +            "description": "Field to specify the post's visibility. It can be: worldwide, country, state and zipcode.",
    +            "enum": [
    +                "zipcode",
    +                "state",
    +                "country",
    +                "worldwide"
    +            ]
    +        },
    +        "likes": {
    +            "type": "array",
    +            "description": "Array holding the user_id of all the users who liked the post.",
    +            "additionalItems": true,
    +            "uniqueItems": true,
    +            "items": {
    +                "type": "string",
    +                "description": "_id of the user who liked the post",
    +                "pattern": "^[a-fA-F0-9]{24}$"
    +            }
    +        },
    +        "types": {
    +            "type": "array",
    +            "description": "Array with the post's tags.\nCan be: Medical Supplies, Groceries/Food, Business, Education, Legal, Wellbeing/Mental, Entertainment, Information, Funding, R&D and Others",
    +            "additionalItems": true,
    +            "uniqueItems": false,
    +            "items": {
    +                "type": "string",
    +                "enum": [
    +                    "Medical Supplies",
    +                    "Groceries/Food",
    +                    "Business",
    +                    "Education",
    +                    "Legal",
    +                    "Wellbeing/Mental",
    +                    "Entertainment",
    +                    "Information",
    +                    "Funding",
    +                    "R&D",
    +                    "Others"
    +                ]
    +            }
    +        },
    +        "language": {
    +            "type": "array",
    +            "additionalItems": true,
    +            "uniqueItems": false,
    +            "items": {
    +                "type": "string"
    +            }
    +        },
    +        "externalLinks": {
    +            "type": "object",
    +            "properties": {
    +                "email": {
    +                    "type": "string",
    +                    "description": "An email related to the post's content."
    +                },
    +                "website": {
    +                    "type": "string",
    +                    "description": "Link for a website related to the post's content."
    +                },
    +                "playStore": {
    +                    "type": "string",
    +                    "description": "Link for a Play Store application related to the post's content."
    +                },
    +                "appStore": {
    +                    "type": "string",
    +                    "description": "Link for a AppStore application related to the post's content."
    +                }
    +            },
    +            "additionalProperties": false
    +        }
    +    },
    +    "required": [
    +        "_id",
    +        "createdAt",
    +        "updatedAt",
    +        "author",
    +        "title",
    +        "content",
    +        "objective",
    +        "visibility",
    +        "likes"
    +    ]
    +}
    2.1.2.4.5 posts JSON data
    {
    +    "_id": ObjectId("507f1f77bcf86cd799439011"),
    +    "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
    +    "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
    +    "expireAt": ISODate("2016-04-08T15:06:21.595Z"),
    +    "author": {
    +        "id": ObjectId("507f1f77bcf86cd799439011"),
    +        "name": "Lorem",
    +        "type": "Lorem",
    +        "location": {
    +            "coordinates": [
    +                35.26,
    +                -32.83
    +            ],
    +            "type": "Point",
    +            "country": "Lorem",
    +            "city": "Lorem",
    +            "neighborhood": "Lorem",
    +            "address": "Lorem"
    +        }
    +    },
    +    "title": "Lorem",
    +    "content": "Lorem",
    +    "objective": "offer",
    +    "visibility": "worldwide",
    +    "likes": [
    +        ObjectId("507f1f77bcf86cd799439011")
    +    ],
    +    "types": [
    +        "Groceries/Food"
    +    ],
    +    "language": [
    +        "Lorem"
    +    ],
    +    "externalLinks": {
    +        "email": "Lorem",
    +        "website": "Lorem",
    +        "playStore": "Lorem",
    +        "appStore": "Lorem"
    +    }
    +}
    2.1.2.4.6 posts Target Script
    use applicationDB;
    +
    +db.createCollection( "posts",{
    +    "storageEngine": {
    +        "wiredTiger": {}
    +    },
    +    "capped": false,
    +    "validator": {
    +        "$jsonSchema": {
    +            "bsonType": "object",
    +            "title": "posts",
    +            "description": "Document to represent a post, asking or offering help to be displayed on the feed",
    +            "additionalProperties": false,
    +            "properties": {
    +                "_id": {
    +                    "bsonType": "objectId"
    +                },
    +                "createdAt": {
    +                    "bsonType": "date",
    +                    "description": "Timestamp with the post's creation date"
    +                },
    +                "updatedAt": {
    +                    "bsonType": "date",
    +                    "description": "Timestamp with the post's last update date"
    +                },
    +                "expireAt": {
    +                    "bsonType": "date",
    +                    "description": "Timestamp with the date the post will expire.\nIf no expiration date is present, the post does not expire."
    +                },
    +                "author": {
    +                    "bsonType": "object",
    +                    "properties": {
    +                        "id": {
    +                            "bsonType": "objectId",
    +                            "description": "Foreign key to the user who created the post."
    +                        },
    +                        "name": {
    +                            "bsonType": "string"
    +                        },
    +                        "type": {
    +                            "bsonType": "string"
    +                        },
    +                        "location": {
    +                            "bsonType": "object",
    +                            "description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.",
    +                            "properties": {
    +                                "coordinates": {
    +                                    "bsonType": "array",
    +                                    "description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.",
    +                                    "additionalItems": true,
    +                                    "minItems": 2,
    +                                    "maxItems": 2,
    +                                    "uniqueItems": false,
    +                                    "items": [
    +                                        {
    +                                            "bsonType": "number",
    +                                            "description": "Location longitude\n",
    +                                            "minimum": -180,
    +                                            "maximum": 180
    +                                        },
    +                                        {
    +                                            "bsonType": "number",
    +                                            "description": "Location latitude\n",
    +                                            "minimum": -90,
    +                                            "maximum": 90
    +                                        }
    +                                    ]
    +                                },
    +                                "type": {
    +                                    "bsonType": "string",
    +                                    "description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**",
    +                                    "enum": [
    +                                        "Point"
    +                                    ]
    +                                },
    +                                "country": {
    +                                    "bsonType": "string",
    +                                    "description": "String holding the country's name.\n"
    +                                },
    +                                "city": {
    +                                    "bsonType": "string",
    +                                    "description": "String holding the city's name."
    +                                },
    +                                "neighborhood": {
    +                                    "bsonType": "string",
    +                                    "description": "String holding the neighborhood's name."
    +                                },
    +                                "address": {
    +                                    "bsonType": "string",
    +                                    "description": "String holding the address (street, number and other details)."
    +                                }
    +                            },
    +                            "additionalProperties": false,
    +                            "required": [
    +                                "coordinates",
    +                                "type"
    +                            ]
    +                        }
    +                    },
    +                    "additionalProperties": false,
    +                    "required": [
    +                        "id",
    +                        "name",
    +                        "type"
    +                    ]
    +                },
    +                "title": {
    +                    "bsonType": "string",
    +                    "description": "The post title."
    +                },
    +                "content": {
    +                    "bsonType": "string",
    +                    "description": "String for the post content."
    +                },
    +                "objective": {
    +                    "bsonType": "string",
    +                    "description": "Field to indicate the post's objective.\nCurrently only two values allowed: \"offering help\" and \"looking for help\".",
    +                    "enum": [
    +                        "request",
    +                        "offer"
    +                    ]
    +                },
    +                "visibility": {
    +                    "bsonType": "string",
    +                    "description": "Field to specify the post's visibility. It can be: worldwide, country, state and zipcode.",
    +                    "enum": [
    +                        "zipcode",
    +                        "state",
    +                        "country",
    +                        "worldwide"
    +                    ]
    +                },
    +                "likes": {
    +                    "bsonType": "array",
    +                    "description": "Array holding the user_id of all the users who liked the post.",
    +                    "additionalItems": true,
    +                    "uniqueItems": true,
    +                    "items": {
    +                        "bsonType": "objectId",
    +                        "description": "_id of the user who liked the post"
    +                    }
    +                },
    +                "types": {
    +                    "bsonType": "array",
    +                    "description": "Array with the post's tags.\nCan be: Medical Supplies, Groceries/Food, Business, Education, Legal, Wellbeing/Mental, Entertainment, Information, Funding, R&D and Others",
    +                    "additionalItems": true,
    +                    "uniqueItems": false,
    +                    "items": {
    +                        "bsonType": "string",
    +                        "enum": [
    +                            "Medical Supplies",
    +                            "Groceries/Food",
    +                            "Business",
    +                            "Education",
    +                            "Legal",
    +                            "Wellbeing/Mental",
    +                            "Entertainment",
    +                            "Information",
    +                            "Funding",
    +                            "R&D",
    +                            "Others"
    +                        ]
    +                    }
    +                },
    +                "language": {
    +                    "bsonType": "array",
    +                    "additionalItems": true,
    +                    "uniqueItems": false,
    +                    "items": {
    +                        "bsonType": "string"
    +                    }
    +                },
    +                "externalLinks": {
    +                    "bsonType": "object",
    +                    "properties": {
    +                        "email": {
    +                            "bsonType": "string",
    +                            "description": "An email related to the post's content."
    +                        },
    +                        "website": {
    +                            "bsonType": "string",
    +                            "description": "Link for a website related to the post's content."
    +                        },
    +                        "playStore": {
    +                            "bsonType": "string",
    +                            "description": "Link for a Play Store application related to the post's content."
    +                        },
    +                        "appStore": {
    +                            "bsonType": "string",
    +                            "description": "Link for a AppStore application related to the post's content."
    +                        }
    +                    },
    +                    "additionalProperties": false
    +                }
    +            },
    +            "required": [
    +                "_id",
    +                "createdAt",
    +                "updatedAt",
    +                "author",
    +                "title",
    +                "content",
    +                "objective",
    +                "visibility",
    +                "likes"
    +            ]
    +        }
    +    },
    +    "validationLevel": "off",
    +    "validationAction": "warn"
    +});
    2.1.2.5 Collection thread
    2.1.2.5.1 thread Tree Diagram
    2.1.2.5.2 thread Properties
    PropertyValue
    Collection namethread
    Technical name
    Id
    Description

    ObjectId that serves as primary key for the message thread.

    +
    DatabaseapplicationDB
    Cappedfalse
    Size
    Max
    Storage engineWiredTiger
    Config String
    Validation levelOff
    Validation actionWarn
    Additional propertiesfalse
    Comments
    2.1.2.5.3 thread Fields
    FieldTypeReqKeyDescriptionComments
    _idobjectIdtrue
    createdAtdatetrue

    Timestamp with the threads's creation date

    +
    updatedAtdatetrue

    Timestamp with the thread's update date

    +
    statusstringtrue

    Curerent thread status, used to define archives, soft deletes and other conversation status. The statuses are:

    +
      +
    • pending: if the user didn't accept the message request yet
    • +
    • blocked: if the one of the user's blocked the other
    • +
    • accepted: message request was accepted and users exchange messages
    • +
    • archived: user archived the message thread
    • +
    +
    participantsarraytrue

    Array of user reference's, containing the participants of the message thread.

    +

    It is modelled as an array to allow expansion to group chats in the future.

    +
    [0]documenttrue
    idobjectIdtrue

    Foreign key to the user who created the post.

    +
    namestringtrue

    User's name

    +
    typestringtrue

    User's type

    +
    newMessagesbooleantrue

    Flag to indicate whether there are new messages since last time the user accessed the thread.

    +
    lastAccessdatetrue

    Timestamp with the last time the user accessed the message thread.

    +
    photourifalse

    URL with the user photo

    +
    2.1.2.5.3.1 Field _id
    2.1.2.5.3.1.1 _id Tree Diagram
    2.1.2.5.3.1.2 _id properties
    PropertyValue
    Name _id
    Technical name
    Id
    Type objectId
    Description
    Dependencies
    Required true
    Primary key true
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.5.3.2 Field createdAt
    2.1.2.5.3.2.1 createdAt Tree Diagram
    2.1.2.5.3.2.2 createdAt properties
    PropertyValue
    Name createdAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the threads's creation date

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.5.3.3 Field updatedAt
    2.1.2.5.3.3.1 updatedAt Tree Diagram
    2.1.2.5.3.3.2 updatedAt properties
    PropertyValue
    Name updatedAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the thread's update date

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.5.3.4 Field status
    2.1.2.5.3.4.1 status Tree Diagram
    2.1.2.5.3.4.2 status properties
    PropertyValue
    Name status
    Technical name
    Id
    Type string
    Description

    Curerent thread status, used to define archives, soft deletes and other conversation status. The statuses are:

    +
      +
    • pending: if the user didn't accept the message request yet
    • +
    • blocked: if the one of the user's blocked the other
    • +
    • accepted: message request was accepted and users exchange messages
    • +
    • archived: user archived the message thread
    • +
    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default pending
    Min length
    Max length
    Pattern
    Format
    Enum blocked,accepted,pending,archived
    Sample
    Comments
    2.1.2.5.3.5 Field participants
    2.1.2.5.3.5.1 participants Tree Diagram
    2.1.2.5.3.5.2 participants Hierarchy
    Parent field: thread
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    [0]documenttrue
    2.1.2.5.3.5.3 participants properties
    PropertyValue
    Name participants
    Technical name
    Id
    Type array
    Description

    Array of user reference's, containing the participants of the message thread.

    +

    It is modelled as an array to allow expansion to group chats in the future.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Min items 2
    Max items
    Unique items false
    Additional items true
    Comments
    2.1.2.5.3.6 Field [0]
    2.1.2.5.3.6.1 [0] Tree Diagram
    2.1.2.5.3.6.2 [0] Hierarchy
    Parent field: participants
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    idobjectIdtruefk

    Foreign key to the user who created the post.

    +
    namestringtrue

    User's name

    +
    typestringtrue

    User's type

    +
    newMessagesbooleantrue

    Flag to indicate whether there are new messages since last time the user accessed the thread.

    +
    lastAccessdatetrue

    Timestamp with the last time the user accessed the message thread.

    +
    photostringfalse

    URL with the user photo

    +
    2.1.2.5.3.6.3 [0] properties
    PropertyValue
    Id
    Type document
    Description
    Dependencies
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.5.3.7 Field id
    2.1.2.5.3.7.1 id Tree Diagram
    2.1.2.5.3.7.2 id properties
    PropertyValue
    Name id
    Technical name
    Id
    Type objectId
    Description

    Foreign key to the user who created the post.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection users
    Foreign field _id
    Relationship type Foreign Key
    Default
    Sample
    Comments
    2.1.2.5.3.8 Field name
    2.1.2.5.3.8.1 name Tree Diagram
    2.1.2.5.3.8.2 name properties
    PropertyValue
    Name name
    Technical name
    Id
    Type string
    Description

    User's name

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.5.3.9 Field type
    2.1.2.5.3.9.1 type Tree Diagram
    2.1.2.5.3.9.2 type properties
    PropertyValue
    Name type
    Technical name
    Id
    Type string
    Description

    User's type

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.5.3.10 Field newMessages
    2.1.2.5.3.10.1 newMessages Tree Diagram
    2.1.2.5.3.10.2 newMessages properties
    PropertyValue
    Name newMessages
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate whether there are new messages since last time the user accessed the thread.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample
    Comments
    2.1.2.5.3.11 Field lastAccess
    2.1.2.5.3.11.1 lastAccess Tree Diagram
    2.1.2.5.3.11.2 lastAccess properties
    PropertyValue
    Name lastAccess
    Technical name
    Id
    Type date
    Description

    Timestamp with the last time the user accessed the message thread.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.5.3.12 Field photo
    2.1.2.5.3.12.1 photo Tree Diagram
    2.1.2.5.3.12.2 photo properties
    PropertyValue
    Name photo
    Technical name
    Id
    Type string
    Description

    URL with the user photo

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample
    Comments
    2.1.2.5.4 thread JSON Schema
    {
    +    "$schema": "http://json-schema.org/draft-04/schema#",
    +    "type": "object",
    +    "title": "thread",
    +    "description": "ObjectId that serves as primary key for the message thread.",
    +    "additionalProperties": false,
    +    "properties": {
    +        "_id": {
    +            "type": "string",
    +            "pattern": "^[a-fA-F0-9]{24}$"
    +        },
    +        "createdAt": {
    +            "type": "string",
    +            "description": "Timestamp with the threads's creation date",
    +            "format": "date-time"
    +        },
    +        "updatedAt": {
    +            "type": "string",
    +            "description": "Timestamp with the thread's update date",
    +            "format": "date-time"
    +        },
    +        "status": {
    +            "type": "string",
    +            "description": "Curerent thread status, used to define archives, soft deletes and other conversation status. The statuses are:\n\n* **pending**: if the user didn't accept the message request yet\n* **blocked**: if the one of the user's blocked the other\n* **accepted**: message request was accepted and users exchange messages\n* **archived**: user archived the message thread\n",
    +            "default": "pending",
    +            "enum": [
    +                "blocked",
    +                "accepted",
    +                "pending",
    +                "archived"
    +            ]
    +        },
    +        "participants": {
    +            "type": "array",
    +            "description": "Array of user reference's, containing the participants of the message thread.\n\nIt is modelled as an array to allow expansion to group chats in the future.",
    +            "additionalItems": true,
    +            "minItems": 2,
    +            "uniqueItems": false,
    +            "items": {
    +                "type": "object",
    +                "properties": {
    +                    "id": {
    +                        "type": "string",
    +                        "description": "Foreign key to the user who created the post.",
    +                        "pattern": "^[a-fA-F0-9]{24}$"
    +                    },
    +                    "name": {
    +                        "type": "string",
    +                        "description": "User's name"
    +                    },
    +                    "type": {
    +                        "type": "string",
    +                        "description": "User's type"
    +                    },
    +                    "newMessages": {
    +                        "type": "boolean",
    +                        "description": "Flag to indicate whether there are new messages since last time the user accessed the thread.",
    +                        "default": false
    +                    },
    +                    "lastAccess": {
    +                        "type": "string",
    +                        "description": "Timestamp with the last time the user accessed the message thread.",
    +                        "format": "date-time"
    +                    },
    +                    "photo": {
    +                        "type": "string",
    +                        "description": "URL with the user photo",
    +                        "format": "uri"
    +                    }
    +                },
    +                "additionalProperties": false,
    +                "required": [
    +                    "id",
    +                    "name",
    +                    "type",
    +                    "newMessages",
    +                    "lastAccess"
    +                ]
    +            }
    +        }
    +    },
    +    "required": [
    +        "_id",
    +        "createdAt",
    +        "updatedAt",
    +        "status",
    +        "participants"
    +    ]
    +}
    2.1.2.5.5 thread JSON data
    {
    +    "_id": ObjectId("507f1f77bcf86cd799439011"),
    +    "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
    +    "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
    +    "status": "pending",
    +    "participants": [
    +        {
    +            "id": ObjectId("507f1f77bcf86cd799439011"),
    +            "name": "Lorem",
    +            "type": "Lorem",
    +            "newMessages": false,
    +            "lastAccess": ISODate("2016-04-08T15:06:21.595Z"),
    +            "photo": "./resource.txt#frag01"
    +        }
    +    ]
    +}
    2.1.2.5.6 thread Target Script
    use applicationDB;
    +
    +db.createCollection( "thread",{
    +    "storageEngine": {
    +        "wiredTiger": {}
    +    },
    +    "capped": false,
    +    "validator": {
    +        "$jsonSchema": {
    +            "bsonType": "object",
    +            "title": "thread",
    +            "description": "ObjectId that serves as primary key for the message thread.",
    +            "additionalProperties": false,
    +            "properties": {
    +                "_id": {
    +                    "bsonType": "objectId"
    +                },
    +                "createdAt": {
    +                    "bsonType": "date",
    +                    "description": "Timestamp with the threads's creation date"
    +                },
    +                "updatedAt": {
    +                    "bsonType": "date",
    +                    "description": "Timestamp with the thread's update date"
    +                },
    +                "status": {
    +                    "bsonType": "string",
    +                    "description": "Curerent thread status, used to define archives, soft deletes and other conversation status. The statuses are:\n\n* **pending**: if the user didn't accept the message request yet\n* **blocked**: if the one of the user's blocked the other\n* **accepted**: message request was accepted and users exchange messages\n* **archived**: user archived the message thread\n",
    +                    "enum": [
    +                        "blocked",
    +                        "accepted",
    +                        "pending",
    +                        "archived"
    +                    ]
    +                },
    +                "participants": {
    +                    "bsonType": "array",
    +                    "description": "Array of user reference's, containing the participants of the message thread.\n\nIt is modelled as an array to allow expansion to group chats in the future.",
    +                    "additionalItems": true,
    +                    "minItems": 2,
    +                    "uniqueItems": false,
    +                    "items": {
    +                        "bsonType": "object",
    +                        "properties": {
    +                            "id": {
    +                                "bsonType": "objectId",
    +                                "description": "Foreign key to the user who created the post."
    +                            },
    +                            "name": {
    +                                "bsonType": "string",
    +                                "description": "User's name"
    +                            },
    +                            "type": {
    +                                "bsonType": "string",
    +                                "description": "User's type"
    +                            },
    +                            "newMessages": {
    +                                "bsonType": "bool",
    +                                "description": "Flag to indicate whether there are new messages since last time the user accessed the thread."
    +                            },
    +                            "lastAccess": {
    +                                "bsonType": "date",
    +                                "description": "Timestamp with the last time the user accessed the message thread."
    +                            },
    +                            "photo": {
    +                                "bsonType": "string",
    +                                "description": "URL with the user photo"
    +                            }
    +                        },
    +                        "additionalProperties": false,
    +                        "required": [
    +                            "id",
    +                            "name",
    +                            "type",
    +                            "newMessages",
    +                            "lastAccess"
    +                        ]
    +                    }
    +                }
    +            },
    +            "required": [
    +                "_id",
    +                "createdAt",
    +                "updatedAt",
    +                "status",
    +                "participants"
    +            ]
    +        }
    +    },
    +    "validationLevel": "off",
    +    "validationAction": "warn"
    +});
    2.1.2.6 Collection users
    2.1.2.6.1 users Tree Diagram
    2.1.2.6.2 users Properties
    PropertyValue
    Collection nameusers
    Technical name
    Id
    Description

    Collection that holds all the data on system's users.

    +

    The users can be of two types: (1) Individual, representing a private user account; and (2) Organization, representing an organization of various types.

    +

    The field 'type' is used to differentiate between the two subschemas, with 'individual' representing private user accounts and "Community", "Government", "Health care provider", "Non-profit", "Other", "R&D", "Startup", "Traditional Company" and "University".

    +
    DatabaseapplicationDB
    Cappedfalse
    Size
    Max
    Storage engineWiredTiger
    Config String
    Validation levelOff
    Validation actionWarn
    Additional propertiestrue
    Comments
    2.1.2.6.3 users Fields
    FieldTypeReqKeyDescriptionComments
    _idobjectIdtrue

    Automatically generated _it as primary key.

    +
    createdAtdatetrue

    Timestamp with the user's creation date

    +

    Thu Apr 16 2020 04:59:24 GMT-0300 (Horário Padrão de Brasília): changed the name to registeredAt

    +
    updatedAtdatetrue

    Timestamp indicating last update on the database.

    +
    authIdstringtrue

    String holding the authentication service id (Auth0).

    +

    This field is a foreign key to the user in the Auth0 database, connecting through the user_id field.

    +
    locationdocumentfalse

    Location document according to the norms of a GeoJSON Object. +The fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.

    +
    coordinatesarraytrue

    Array with the coordinates, specifying longitude first and latitude second, as default in the GeoJSON definition.

    +
    [0]numericfalse

    Location longitude

    +
    [1]numericfalse

    Location latitude

    +
    typestringtrue

    Type of the GeoJSON Object. +Please refer to the official documentation for more information.

    +

    In our case, the value will always be of the type "Point".

    +
    countrystringfalse

    String holding the country's name.

    +
    citystringfalse

    String holding the city's name.

    +
    neighborhoodstringfalse

    String holding the neighborhood's name.

    +
    addressstringfalse

    String holding the address (street, number and other details).

    +
    aboutstringfalse

    Small self-introduction, limited to 100 char

    +
    photourifalse

    URI with the location of the profile's photo.

    +
    oneOfchoicefalse
    [0] subschemasubschemafalse

    Subschema representing a individual account.

    +
    typestringtrue
    firstNamestringtrue

    The first name of the user

    +
    lastNamestringfalse

    The last name of the user. Optional field.

    +
    needsdocumenttrue

    User's need in the app, representing what kind of help he/she needs

    +
    medicalHelpbooleantrue

    Flag to indicate wheter the user needs medical help. +Marking this indicates he shows symptoms of COVID-19.

    +
    otherHelpbooleantrue

    Flag to indicate wheter the user needs non-medical help, such as getting groceries, medice and etc..

    +
    objectivesdocumentfalse

    Document with what are the objectives of the user through the application, such as donating, volunteering or sharing information.

    +
    volunteerbooleantrue

    Flag to indicate wheter the user wants to volunteer for iniciatives through the app.

    +
    donatebooleantrue

    Flag to indicate wheter the user wants to donate for iniciatives through the app.

    +
    shareInformationbooleantrue

    Flag to indicate wheter the user wants to share information through the app.

    +
    urlsdocumentfalse

    Document holding the user urls to external websites and social networks

    +
    facebookurifalse

    URL to user's Facebook page.

    +
    linkedinurifalse

    URL to user's Linkedin page.

    +
    twitterurifalse

    URL to user's Twitter page.

    +
    githuburifalse

    URL to user's Github page.

    +
    websiteurifalse

    URL to user's personal website.

    +
    [1] subschemasubschemafalse

    Subschema representing an organization (colective) account.

    +
    typestringtrue

    The type of the organization. Can be: Community, Government, Health care provider, Non-profit, Other, R&D, Startup, Traditional Company and University. All names are store in lowercase only.

    +
    industrystringtrue

    Industry from which the organization participates. Plan is for this values to be scraped from linkedin industries.

    +
    ownerIdobjectIdtrue

    _id of the user who owns the organization.

    +
    namestringtrue

    Organization's name.

    +
    needsdocumenttrue

    Document with what are the objectives of the organization through the application, such as finding volunteers, staff, investors and donors.

    +
    volunteersbooleantrue

    Flag to indicate wheter the organization is seeking volunteers through the app.

    +
    donationsbooleantrue

    Flag to indicate wheter the organization is seeking donations through the app.

    +
    staffbooleantrue

    Flag to indicate wheter the organization is seeking staff through the app.

    +
    otherbooleantrue

    Flag to indicate wheter the organization is seeking other needs through the app.

    +
    globalbooleanfalse

    Flag to indicate wheter this organization is global.

    +
    urlsdocumentfalse

    Document holding external urls and refs to the organization such as social media profiles.

    +
    linkedinurifalse

    URL to organization's Linkedin page.

    +
    twitterurifalse

    URL to organization's Twitter page.

    +
    websiteurifalse

    URL to organization's website.

    +
    playstoreurifalse

    URL to organization's page at Google Play Store.

    +
    appstoreurifalse

    URL to organization's page at Apple App Store

    +
    languagestringfalse

    Field to inidicate the language used by the organization.

    +
    anyOfchoicefalse
    [0] subschemasubschemafalse

    Case where the user comes from social networks with a registration that uses email. In this case, the email field is required. This case covers the great majority of currently supported social network authentications.

    +
    emailemailtrue

    User's email validated by a regex pattern.

    +
    [1] subschemasubschemafalse

    Case where the user comes from social networks with a registration that allows the use of only the phone. In this case, the phone field is required, and the email isn't.

    +

    An example of ocial network that falls into this case is Twitter.

    +
    phonestringtrue
    2.1.2.6.3.1 Field createdAt
    2.1.2.6.3.1.1 createdAt Tree Diagram
    2.1.2.6.3.1.2 createdAt properties
    PropertyValue
    Name createdAt
    Technical name
    Id
    Type date
    Description

    Timestamp with the user's creation date

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments

    Thu Apr 16 2020 04:59:24 GMT-0300 (Horário Padrão de Brasília): changed the name to registeredAt

    +
    2.1.2.6.3.2 Field _id
    2.1.2.6.3.2.1 _id Tree Diagram
    2.1.2.6.3.2.2 _id properties
    PropertyValue
    Name _id
    Technical name
    Id
    Type objectId
    Description

    Automatically generated _it as primary key.

    +
    Dependencies
    Required true
    Primary key true
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.6.3.3 Field updatedAt
    2.1.2.6.3.3.1 updatedAt Tree Diagram
    2.1.2.6.3.3.2 updatedAt properties
    PropertyValue
    Name updatedAt
    Technical name
    Id
    Type date
    Description

    Timestamp indicating last update on the database.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Sample
    Comments
    2.1.2.6.3.4 Field authId
    2.1.2.6.3.4.1 authId Tree Diagram
    2.1.2.6.3.4.2 authId properties
    PropertyValue
    Name authId
    Technical name
    Id
    Type string
    Description

    String holding the authentication service id (Auth0).

    +

    This field is a foreign key to the user in the Auth0 database, connecting through the user_id field.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.6.3.5 Field location
    2.1.2.6.3.5.1 location Tree Diagram
    2.1.2.6.3.5.2 location properties
    PropertyValue
    Name location
    Technical name
    $ref#model/definitions/location
    Reference type model
    Reference description
    2.1.2.6.3.6 Field about
    2.1.2.6.3.6.1 about Tree Diagram
    2.1.2.6.3.6.2 about properties
    PropertyValue
    Name about
    Technical name
    Id
    Type string
    Description

    Small self-introduction, limited to 100 char

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.6.3.7 Field photo
    2.1.2.6.3.7.1 photo Tree Diagram
    2.1.2.6.3.7.2 photo properties
    PropertyValue
    Name photo
    Technical name
    Id
    Type string
    Description

    URI with the location of the profile's photo.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample
    Comments
    2.1.2.6.3.8 Field oneOf
    2.1.2.6.3.8.1 oneOf Tree Diagram
    2.1.2.6.3.8.2 oneOf Hierarchy
    Parent field: users
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    subschemasubschemafalse

    Subschema representing a individual account.

    +
    subschemasubschemafalse

    Subschema representing an organization (colective) account.

    +
    2.1.2.6.3.8.3 oneOf properties
    PropertyValue
    Choice oneOf
    Description
    Comments
    2.1.2.6.3.9 Field [0] subschema
    2.1.2.6.3.9.1 [0] subschema Tree Diagram
    2.1.2.6.3.9.2 [0] subschema Hierarchy
    Parent field: oneOf
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    typestringtrue
    firstNamestringtrue

    The first name of the user

    +
    lastNamestringfalse

    The last name of the user. Optional field.

    +
    needsdocumenttrue

    User's need in the app, representing what kind of help he/she needs

    +
    objectivesdocumentfalse

    Document with what are the objectives of the user through the application, such as donating, volunteering or sharing information.

    +
    urlsdocumentfalse

    Document holding the user urls to external websites and social networks

    +
    2.1.2.6.3.9.3 [0] subschema properties
    PropertyValue
    Display name subschema
    Id individual
    Description

    Subschema representing a individual account.

    +
    Required
    Min Properties
    Max Properties
    Additional properties true
    Comments
    2.1.2.6.3.10 Field type
    2.1.2.6.3.10.1 type Tree Diagram
    2.1.2.6.3.10.2 type properties
    PropertyValue
    Name type
    Technical name
    Id
    Type string
    Description
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum individual
    Sample
    Comments
    2.1.2.6.3.11 Field firstName
    2.1.2.6.3.11.1 firstName Tree Diagram
    2.1.2.6.3.11.2 firstName properties
    PropertyValue
    Name firstName
    Technical name
    Id
    Type string
    Description

    The first name of the user

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.6.3.12 Field lastName
    2.1.2.6.3.12.1 lastName Tree Diagram
    2.1.2.6.3.12.2 lastName properties
    PropertyValue
    Name lastName
    Technical name
    Id
    Type string
    Description

    The last name of the user. Optional field.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.6.3.13 Field needs
    2.1.2.6.3.13.1 needs Tree Diagram
    2.1.2.6.3.13.2 needs Hierarchy
    Parent field: [0] subschema
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    medicalHelpbooleantrue

    Flag to indicate wheter the user needs medical help. +Marking this indicates he shows symptoms of COVID-19.

    +
    otherHelpbooleantrue

    Flag to indicate wheter the user needs non-medical help, such as getting groceries, medice and etc..

    +
    2.1.2.6.3.13.3 needs properties
    PropertyValue
    Name needs
    Technical name
    Id
    Type document
    Description

    User's need in the app, representing what kind of help he/she needs

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.6.3.14 Field medicalHelp
    2.1.2.6.3.14.1 medicalHelp Tree Diagram
    2.1.2.6.3.14.2 medicalHelp properties
    PropertyValue
    Name medicalHelp
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the user needs medical help. +Marking this indicates he shows symptoms of COVID-19.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.6.3.15 Field otherHelp
    2.1.2.6.3.15.1 otherHelp Tree Diagram
    2.1.2.6.3.15.2 otherHelp properties
    PropertyValue
    Name otherHelp
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the user needs non-medical help, such as getting groceries, medice and etc..

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.6.3.16 Field objectives
    2.1.2.6.3.16.1 objectives Tree Diagram
    2.1.2.6.3.16.2 objectives Hierarchy
    Parent field: [0] subschema
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    volunteerbooleantrue

    Flag to indicate wheter the user wants to volunteer for iniciatives through the app.

    +
    donatebooleantrue

    Flag to indicate wheter the user wants to donate for iniciatives through the app.

    +
    shareInformationbooleantrue

    Flag to indicate wheter the user wants to share information through the app.

    +
    2.1.2.6.3.16.3 objectives properties
    PropertyValue
    Name objectives
    Technical name
    Id
    Type document
    Description

    Document with what are the objectives of the user through the application, such as donating, volunteering or sharing information.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.6.3.17 Field volunteer
    2.1.2.6.3.17.1 volunteer Tree Diagram
    2.1.2.6.3.17.2 volunteer properties
    PropertyValue
    Name volunteer
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the user wants to volunteer for iniciatives through the app.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.6.3.18 Field donate
    2.1.2.6.3.18.1 donate Tree Diagram
    2.1.2.6.3.18.2 donate properties
    PropertyValue
    Name donate
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the user wants to donate for iniciatives through the app.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.6.3.19 Field shareInformation
    2.1.2.6.3.19.1 shareInformation Tree Diagram
    2.1.2.6.3.19.2 shareInformation properties
    PropertyValue
    Name shareInformation
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the user wants to share information through the app.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default true
    Sample true
    Comments
    2.1.2.6.3.20 Field urls
    2.1.2.6.3.20.1 urls Tree Diagram
    2.1.2.6.3.20.2 urls Hierarchy
    Parent field: [0] subschema
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    facebookstringfalse

    URL to user's Facebook page.

    +
    linkedinstringfalse

    URL to user's Linkedin page.

    +
    twitterstringfalse

    URL to user's Twitter page.

    +
    githubstringfalse

    URL to user's Github page.

    +
    websitestringfalse

    URL to user's personal website.

    +
    2.1.2.6.3.20.3 urls properties
    PropertyValue
    Name urls
    Technical name
    Id
    Type document
    Description

    Document holding the user urls to external websites and social networks

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.6.3.21 Field facebook
    2.1.2.6.3.21.1 facebook Tree Diagram
    2.1.2.6.3.21.2 facebook properties
    PropertyValue
    Name facebook
    Technical name
    Id
    Type string
    Description

    URL to user's Facebook page.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://facebook.com/myProfile
    Comments
    2.1.2.6.3.22 Field linkedin
    2.1.2.6.3.22.1 linkedin Tree Diagram
    2.1.2.6.3.22.2 linkedin properties
    PropertyValue
    Name linkedin
    Technical name
    Id
    Type string
    Description

    URL to user's Linkedin page.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://linkedin.com/in/myProfile
    Comments
    2.1.2.6.3.23 Field twitter
    2.1.2.6.3.23.1 twitter Tree Diagram
    2.1.2.6.3.23.2 twitter properties
    PropertyValue
    Name twitter
    Technical name
    Id
    Type string
    Description

    URL to user's Twitter page.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://twitter.com/myProfile
    Comments
    2.1.2.6.3.24 Field github
    2.1.2.6.3.24.1 github Tree Diagram
    2.1.2.6.3.24.2 github properties
    PropertyValue
    Name github
    Technical name
    Id
    Type string
    Description

    URL to user's Github page.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://github.com/myProfile
    Comments
    2.1.2.6.3.25 Field website
    2.1.2.6.3.25.1 website Tree Diagram
    2.1.2.6.3.25.2 website properties
    PropertyValue
    Name website
    Technical name
    Id
    Type string
    Description

    URL to user's personal website.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://mypersonalwebsite.com
    Comments
    2.1.2.6.3.26 Field [1] subschema
    2.1.2.6.3.26.1 [1] subschema Tree Diagram
    2.1.2.6.3.26.2 [1] subschema Hierarchy
    Parent field: oneOf
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    typestringtrue

    The type of the organization. Can be: Community, Government, Health care provider, Non-profit, Other, R&D, Startup, Traditional Company and University. All names are store in lowercase only.

    +
    industrystringtrue

    Industry from which the organization participates. Plan is for this values to be scraped from linkedin industries.

    +
    ownerIdobjectIdtruefk

    _id of the user who owns the organization.

    +
    namestringtrue

    Organization's name.

    +
    needsdocumenttrue

    Document with what are the objectives of the organization through the application, such as finding volunteers, staff, investors and donors.

    +
    globalbooleanfalse

    Flag to indicate wheter this organization is global.

    +
    urlsdocumentfalse

    Document holding external urls and refs to the organization such as social media profiles.

    +
    languagestringfalse

    Field to inidicate the language used by the organization.

    +
    2.1.2.6.3.26.3 [1] subschema properties
    PropertyValue
    Display name subschema
    Id organization
    Description

    Subschema representing an organization (colective) account.

    +
    Required
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.6.3.27 Field type
    2.1.2.6.3.27.1 type Tree Diagram
    2.1.2.6.3.27.2 type properties
    PropertyValue
    Name type
    Technical name
    Id
    Type string
    Description

    The type of the organization. Can be: Community, Government, Health care provider, Non-profit, Other, R&D, Startup, Traditional Company and University. All names are store in lowercase only.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum startup,traditional company,community,government,r&d,non-profit,university,health care provider,other
    Sample
    Comments
    2.1.2.6.3.28 Field industry
    2.1.2.6.3.28.1 industry Tree Diagram
    2.1.2.6.3.28.2 industry properties
    PropertyValue
    Name industry
    Technical name
    Id
    Type string
    Description

    Industry from which the organization participates. Plan is for this values to be scraped from linkedin industries.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.6.3.29 Field ownerId
    2.1.2.6.3.29.1 ownerId Tree Diagram
    2.1.2.6.3.29.2 ownerId properties
    PropertyValue
    Name ownerId
    Technical name
    Id
    Type objectId
    Description

    _id of the user who owns the organization.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection users
    Foreign field _id
    Relationship type Foreign Key
    Default
    Sample
    Comments
    2.1.2.6.3.30 Field name
    2.1.2.6.3.30.1 name Tree Diagram
    2.1.2.6.3.30.2 name properties
    PropertyValue
    Name name
    Technical name
    Id
    Type string
    Description

    Organization's name.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.6.3.31 Field needs
    2.1.2.6.3.31.1 needs Tree Diagram
    2.1.2.6.3.31.2 needs Hierarchy
    Parent field: [1] subschema
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    volunteersbooleantrue

    Flag to indicate wheter the organization is seeking volunteers through the app.

    +
    donationsbooleantrue

    Flag to indicate wheter the organization is seeking donations through the app.

    +
    staffbooleantrue

    Flag to indicate wheter the organization is seeking staff through the app.

    +
    otherbooleantrue

    Flag to indicate wheter the organization is seeking other needs through the app.

    +
    2.1.2.6.3.31.3 needs properties
    PropertyValue
    Name needs
    Technical name
    Id
    Type document
    Description

    Document with what are the objectives of the organization through the application, such as finding volunteers, staff, investors and donors.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.6.3.32 Field volunteers
    2.1.2.6.3.32.1 volunteers Tree Diagram
    2.1.2.6.3.32.2 volunteers properties
    PropertyValue
    Name volunteers
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the organization is seeking volunteers through the app.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample true
    Comments
    2.1.2.6.3.33 Field donations
    2.1.2.6.3.33.1 donations Tree Diagram
    2.1.2.6.3.33.2 donations properties
    PropertyValue
    Name donations
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the organization is seeking donations through the app.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.6.3.34 Field staff
    2.1.2.6.3.34.1 staff Tree Diagram
    2.1.2.6.3.34.2 staff properties
    PropertyValue
    Name staff
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the organization is seeking staff through the app.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.6.3.35 Field other
    2.1.2.6.3.35.1 other Tree Diagram
    2.1.2.6.3.35.2 other properties
    PropertyValue
    Name other
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter the organization is seeking other needs through the app.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample false
    Comments
    2.1.2.6.3.36 Field global
    2.1.2.6.3.36.1 global Tree Diagram
    2.1.2.6.3.36.2 global properties
    PropertyValue
    Name global
    Technical name
    Id
    Type boolean
    Description

    Flag to indicate wheter this organization is global.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default false
    Sample
    Comments
    2.1.2.6.3.37 Field urls
    2.1.2.6.3.37.1 urls Tree Diagram
    2.1.2.6.3.37.2 urls Hierarchy
    Parent field: [1] subschema
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    linkedinstringfalse

    URL to organization's Linkedin page.

    +
    twitterstringfalse

    URL to organization's Twitter page.

    +
    websitestringfalse

    URL to organization's website.

    +
    playstorestringfalse

    URL to organization's page at Google Play Store.

    +
    appstorestringfalse

    URL to organization's page at Apple App Store

    +
    2.1.2.6.3.37.3 urls properties
    PropertyValue
    Name urls
    Technical name
    Id
    Type document
    Description

    Document holding external urls and refs to the organization such as social media profiles.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    DBRef
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.6.3.38 Field linkedin
    2.1.2.6.3.38.1 linkedin Tree Diagram
    2.1.2.6.3.38.2 linkedin properties
    PropertyValue
    Name linkedin
    Technical name
    Id
    Type string
    Description

    URL to organization's Linkedin page.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://linkedin.com/in/myProfile
    Comments
    2.1.2.6.3.39 Field twitter
    2.1.2.6.3.39.1 twitter Tree Diagram
    2.1.2.6.3.39.2 twitter properties
    PropertyValue
    Name twitter
    Technical name
    Id
    Type string
    Description

    URL to organization's Twitter page.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://twitter.com/myProfile
    Comments
    2.1.2.6.3.40 Field website
    2.1.2.6.3.40.1 website Tree Diagram
    2.1.2.6.3.40.2 website properties
    PropertyValue
    Name website
    Technical name
    Id
    Type string
    Description

    URL to organization's website.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://mypersonalwebsite.com
    Comments
    2.1.2.6.3.41 Field playstore
    2.1.2.6.3.41.1 playstore Tree Diagram
    2.1.2.6.3.41.2 playstore properties
    PropertyValue
    Name playstore
    Technical name
    Id
    Type string
    Description

    URL to organization's page at Google Play Store.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://playstore.com/myOrg
    Comments
    2.1.2.6.3.42 Field appstore
    2.1.2.6.3.42.1 appstore Tree Diagram
    2.1.2.6.3.42.2 appstore properties
    PropertyValue
    Name appstore
    Technical name
    Id
    Type string
    Description

    URL to organization's page at Apple App Store

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format uri
    Enum
    Sample http://appstore.com/myOrg
    Comments
    2.1.2.6.3.43 Field language
    2.1.2.6.3.43.1 language Tree Diagram
    2.1.2.6.3.43.2 language properties
    PropertyValue
    Name language
    Technical name
    Id
    Type string
    Description

    Field to inidicate the language used by the organization.

    +
    Dependencies
    Required false
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.6.3.44 Field anyOf
    2.1.2.6.3.44.1 anyOf Tree Diagram
    2.1.2.6.3.44.2 anyOf Hierarchy
    Parent field: users
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    subschemasubschemafalse

    Case where the user comes from social networks with a registration that uses email. In this case, the email field is required. This case covers the great majority of currently supported social network authentications.

    +
    subschemasubschemafalse

    Case where the user comes from social networks with a registration that allows the use of only the phone. In this case, the phone field is required, and the email isn't.

    +

    An example of ocial network that falls into this case is Twitter.

    +
    2.1.2.6.3.44.3 anyOf properties
    PropertyValue
    Choice anyOf
    Description
    Comments
    2.1.2.6.3.45 Field [0] subschema
    2.1.2.6.3.45.1 [0] subschema Tree Diagram
    2.1.2.6.3.45.2 [0] subschema Hierarchy
    Parent field: anyOf
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    emailstringtrue

    User's email validated by a regex pattern.

    +
    2.1.2.6.3.45.3 [0] subschema properties
    PropertyValue
    Display name subschema
    Id emailPK
    Description

    Case where the user comes from social networks with a registration that uses email. In this case, the email field is required. This case covers the great majority of currently supported social network authentications.

    +
    Required
    Min Properties
    Max Properties
    Additional properties true
    Comments
    2.1.2.6.3.46 Field email
    2.1.2.6.3.46.1 email Tree Diagram
    2.1.2.6.3.46.2 email properties
    PropertyValue
    Name email
    Technical name
    Id
    Type string
    Description

    User's email validated by a regex pattern.

    +
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format email
    Enum
    Sample test_user@fightpandemics.com
    Comments
    2.1.2.6.3.47 Field [1] subschema
    2.1.2.6.3.47.1 [1] subschema Tree Diagram
    2.1.2.6.3.47.2 [1] subschema Hierarchy
    Parent field: anyOf
    Child field(s):
    FieldTypeReqKeyDescriptionComments
    phonestringtrue
    2.1.2.6.3.47.3 [1] subschema properties
    PropertyValue
    Display name subschema
    Id phonePK
    Description

    Case where the user comes from social networks with a registration that allows the use of only the phone. In this case, the phone field is required, and the email isn't.

    +

    An example of ocial network that falls into this case is Twitter.

    +
    Required
    Min Properties
    Max Properties
    Additional properties false
    Comments
    2.1.2.6.3.48 Field phone
    2.1.2.6.3.48.1 phone Tree Diagram
    2.1.2.6.3.48.2 phone properties
    PropertyValue
    Name phone
    Technical name
    Id
    Type string
    Description
    Dependencies
    Required true
    Primary key false
    Foreign collection
    Foreign field
    Relationship type
    Default
    Min length
    Max length
    Pattern
    Format
    Enum
    Sample
    Comments
    2.1.2.6.4 users JSON Schema
    {
    +    "$schema": "http://json-schema.org/draft-04/schema#",
    +    "type": "object",
    +    "title": "users",
    +    "description": "Collection that holds all the data on system's users. \n\nThe users can be of **two types**: **(1) Individual**, representing a private user account; and **(2) Organization**, representing an organization of various types.\n\nThe field 'type' is used to differentiate between the two subschemas, with 'individual' representing private user accounts and \"Community\", \"Government\", \"Health care provider\", \"Non-profit\", \"Other\", \"R&D\", \"Startup\", \"Traditional Company\" and \"University\".",
    +    "additionalProperties": true,
    +    "properties": {
    +        "createdAt": {
    +            "type": "string",
    +            "description": "Timestamp with the user's creation date",
    +            "format": "date-time"
    +        },
    +        "_id": {
    +            "type": "string",
    +            "description": "Automatically generated _it as primary key.",
    +            "pattern": "^[a-fA-F0-9]{24}$"
    +        },
    +        "updatedAt": {
    +            "type": "string",
    +            "description": "Timestamp indicating last update on the database.",
    +            "format": "date-time"
    +        },
    +        "authId": {
    +            "type": "string",
    +            "description": "String holding the authentication service id (Auth0).\n\nThis field is a **foreign key to the user in the Auth0 database**, connecting through the user_id field."
    +        },
    +        "location": {
    +            "$ref": "#model/definitions/location"
    +        },
    +        "about": {
    +            "type": "string",
    +            "description": "Small self-introduction, limited to 100 char"
    +        },
    +        "photo": {
    +            "type": "string",
    +            "description": "URI with the location of the profile's photo.",
    +            "format": "uri"
    +        }
    +    },
    +    "oneOf": [
    +        {
    +            "id": "individual",
    +            "type": "object",
    +            "description": "Subschema representing a individual account.",
    +            "properties": {
    +                "type": {
    +                    "type": "string",
    +                    "enum": [
    +                        "individual"
    +                    ]
    +                },
    +                "firstName": {
    +                    "type": "string",
    +                    "description": "The first name of the user"
    +                },
    +                "lastName": {
    +                    "type": "string",
    +                    "description": "The last name of the user. Optional field."
    +                },
    +                "needs": {
    +                    "type": "object",
    +                    "description": "User's need in the app, representing what kind of help he/she needs",
    +                    "properties": {
    +                        "medicalHelp": {
    +                            "type": "boolean",
    +                            "description": "Flag to indicate wheter the user needs medical help. \nMarking this indicates he shows symptoms of COVID-19.",
    +                            "default": false
    +                        },
    +                        "otherHelp": {
    +                            "type": "boolean",
    +                            "description": "Flag to indicate wheter the user needs non-medical help, such as getting groceries, medice and etc..",
    +                            "default": false
    +                        }
    +                    },
    +                    "additionalProperties": false,
    +                    "required": [
    +                        "medicalHelp",
    +                        "otherHelp"
    +                    ]
    +                },
    +                "objectives": {
    +                    "type": "object",
    +                    "description": "Document with what are the objectives of the user through the application, such as donating, volunteering or sharing information.",
    +                    "properties": {
    +                        "volunteer": {
    +                            "type": "boolean",
    +                            "description": "Flag to indicate wheter the user wants to volunteer for iniciatives through the app.",
    +                            "default": false
    +                        },
    +                        "donate": {
    +                            "type": "boolean",
    +                            "description": "Flag to indicate wheter the user wants to donate for iniciatives through the app.",
    +                            "default": false
    +                        },
    +                        "shareInformation": {
    +                            "type": "boolean",
    +                            "description": "Flag to indicate wheter the user wants to share information through the app.",
    +                            "default": true
    +                        }
    +                    },
    +                    "additionalProperties": false,
    +                    "required": [
    +                        "volunteer",
    +                        "donate",
    +                        "shareInformation"
    +                    ]
    +                },
    +                "urls": {
    +                    "type": "object",
    +                    "description": "Document holding the user urls to external websites and social networks",
    +                    "properties": {
    +                        "facebook": {
    +                            "type": "string",
    +                            "description": "URL to user's Facebook page.",
    +                            "format": "uri"
    +                        },
    +                        "linkedin": {
    +                            "type": "string",
    +                            "description": "URL to user's Linkedin page.",
    +                            "format": "uri"
    +                        },
    +                        "twitter": {
    +                            "type": "string",
    +                            "description": "URL to user's Twitter page.",
    +                            "format": "uri"
    +                        },
    +                        "github": {
    +                            "type": "string",
    +                            "description": "URL to user's Github page.",
    +                            "format": "uri"
    +                        },
    +                        "website": {
    +                            "type": "string",
    +                            "description": "URL to user's personal website.",
    +                            "format": "uri"
    +                        }
    +                    },
    +                    "additionalProperties": false
    +                }
    +            },
    +            "additionalProperties": true,
    +            "required": [
    +                "type",
    +                "firstName",
    +                "needs"
    +            ]
    +        },
    +        {
    +            "id": "organization",
    +            "type": "object",
    +            "description": "Subschema representing an organization (colective) account.",
    +            "properties": {
    +                "type": {
    +                    "type": "string",
    +                    "description": "The type of the organization. Can be: Community, Government, Health care provider, Non-profit, Other, R&D, Startup, Traditional Company and University. All names are store in lowercase only.",
    +                    "enum": [
    +                        "startup",
    +                        "traditional company",
    +                        "community",
    +                        "government",
    +                        "r&d",
    +                        "non-profit",
    +                        "university",
    +                        "health care provider",
    +                        "other"
    +                    ]
    +                },
    +                "industry": {
    +                    "type": "string",
    +                    "description": "Industry from which the organization participates. Plan is for this values to be scraped from linkedin industries."
    +                },
    +                "ownerId": {
    +                    "type": "string",
    +                    "description": "_id of the user who owns the organization.",
    +                    "pattern": "^[a-fA-F0-9]{24}$"
    +                },
    +                "name": {
    +                    "type": "string",
    +                    "description": "Organization's name.\n"
    +                },
    +                "needs": {
    +                    "type": "object",
    +                    "description": "Document with what are the objectives of the organization through the application, such as finding volunteers, staff, investors and donors.",
    +                    "properties": {
    +                        "volunteers": {
    +                            "type": "boolean",
    +                            "description": "Flag to indicate wheter the organization is seeking volunteers through the app.",
    +                            "default": false
    +                        },
    +                        "donations": {
    +                            "type": "boolean",
    +                            "description": "Flag to indicate wheter the organization is seeking donations through the app.",
    +                            "default": false
    +                        },
    +                        "staff": {
    +                            "type": "boolean",
    +                            "description": "Flag to indicate wheter the organization is seeking staff through the app.",
    +                            "default": false
    +                        },
    +                        "other": {
    +                            "type": "boolean",
    +                            "description": "Flag to indicate wheter the organization is seeking other needs through the app.",
    +                            "default": false
    +                        }
    +                    },
    +                    "additionalProperties": false,
    +                    "required": [
    +                        "volunteers",
    +                        "donations",
    +                        "staff",
    +                        "other"
    +                    ]
    +                },
    +                "global": {
    +                    "type": "boolean",
    +                    "description": "Flag to indicate wheter this organization is global.",
    +                    "default": false
    +                },
    +                "urls": {
    +                    "type": "object",
    +                    "description": "Document holding external urls and refs to the organization such as social media profiles.",
    +                    "properties": {
    +                        "linkedin": {
    +                            "type": "string",
    +                            "description": "URL to organization's Linkedin page.",
    +                            "format": "uri"
    +                        },
    +                        "twitter": {
    +                            "type": "string",
    +                            "description": "URL to organization's Twitter page.",
    +                            "format": "uri"
    +                        },
    +                        "website": {
    +                            "type": "string",
    +                            "description": "URL to organization's website.",
    +                            "format": "uri"
    +                        },
    +                        "playstore": {
    +                            "type": "string",
    +                            "description": "URL to organization's page at Google Play Store.",
    +                            "format": "uri"
    +                        },
    +                        "appstore": {
    +                            "type": "string",
    +                            "description": "URL to organization's page at Apple App Store",
    +                            "format": "uri"
    +                        }
    +                    },
    +                    "additionalProperties": false
    +                },
    +                "language": {
    +                    "type": "string",
    +                    "description": "Field to inidicate the language used by the organization."
    +                }
    +            },
    +            "additionalProperties": false,
    +            "required": [
    +                "type",
    +                "industry",
    +                "ownerId",
    +                "name",
    +                "needs"
    +            ]
    +        }
    +    ],
    +    "anyOf": [
    +        {
    +            "id": "emailPK",
    +            "type": "object",
    +            "description": "Case where the user comes from social networks with a registration that uses email. In this case, the email field is required. This case covers the great majority of currently supported social network authentications.",
    +            "properties": {
    +                "email": {
    +                    "type": "string",
    +                    "description": "User's email validated by a regex pattern.",
    +                    "format": "email"
    +                }
    +            },
    +            "additionalProperties": true,
    +            "required": [
    +                "email"
    +            ]
    +        },
    +        {
    +            "id": "phonePK",
    +            "type": "object",
    +            "description": "Case where the user comes from social networks with a registration that allows the use of only the phone. In this case, the phone field is required, and the email isn't. \n\nAn example of ocial network that falls into this case is Twitter.",
    +            "properties": {
    +                "phone": {
    +                    "type": "string"
    +                }
    +            },
    +            "additionalProperties": false,
    +            "required": [
    +                "phone"
    +            ]
    +        }
    +    ],
    +    "required": [
    +        "createdAt",
    +        "_id",
    +        "updatedAt",
    +        "authId"
    +    ]
    +}
    2.1.2.6.5 users JSON data
    {
    +    "createdAt": ISODate("2016-04-08T15:06:21.595Z"),
    +    "_id": ObjectId("507f1f77bcf86cd799439011"),
    +    "updatedAt": ISODate("2016-04-08T15:06:21.595Z"),
    +    "authId": "Lorem",
    +    "location": {
    +        "coordinates": [
    +            35.26,
    +            -32.83
    +        ],
    +        "type": "Point",
    +        "country": "Lorem",
    +        "city": "Lorem",
    +        "neighborhood": "Lorem",
    +        "address": "Lorem"
    +    },
    +    "about": "Lorem",
    +    "photo": "./resource.txt#frag01",
    +    "type": "other",
    +    "industry": "Lorem",
    +    "ownerId": ObjectId("507f1f77bcf86cd799439011"),
    +    "name": "Lorem",
    +    "needs": {
    +        "volunteers": true,
    +        "donations": false,
    +        "staff": false,
    +        "other": false
    +    },
    +    "global": false,
    +    "urls": {
    +        "linkedin": "http://linkedin.com/in/myProfile",
    +        "twitter": "http://twitter.com/myProfile",
    +        "website": "http://mypersonalwebsite.com",
    +        "playstore": "http://playstore.com/myOrg",
    +        "appstore": "http://appstore.com/myOrg"
    +    },
    +    "language": "Lorem",
    +    "email": "test_user@fightpandemics.com"
    +}
    2.1.2.6.6 users Target Script
    use applicationDB;
    +
    +db.createCollection( "users",{
    +    "storageEngine": {
    +        "wiredTiger": {}
    +    },
    +    "capped": false,
    +    "validator": {
    +        "$jsonSchema": {
    +            "bsonType": "object",
    +            "title": "users",
    +            "description": "Collection that holds all the data on system's users. \n\nThe users can be of **two types**: **(1) Individual**, representing a private user account; and **(2) Organization**, representing an organization of various types.\n\nThe field 'type' is used to differentiate between the two subschemas, with 'individual' representing private user accounts and \"Community\", \"Government\", \"Health care provider\", \"Non-profit\", \"Other\", \"R&D\", \"Startup\", \"Traditional Company\" and \"University\".",
    +            "additionalProperties": true,
    +            "properties": {
    +                "_id": {
    +                    "bsonType": "objectId",
    +                    "description": "Automatically generated _it as primary key."
    +                },
    +                "createdAt": {
    +                    "bsonType": "date",
    +                    "description": "Timestamp with the user's creation date"
    +                },
    +                "updatedAt": {
    +                    "bsonType": "date",
    +                    "description": "Timestamp indicating last update on the database."
    +                },
    +                "authId": {
    +                    "bsonType": "string",
    +                    "description": "String holding the authentication service id (Auth0).\n\nThis field is a **foreign key to the user in the Auth0 database**, connecting through the user_id field."
    +                },
    +                "location": {
    +                    "bsonType": "object",
    +                    "description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.",
    +                    "properties": {
    +                        "coordinates": {
    +                            "bsonType": "array",
    +                            "description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.",
    +                            "additionalItems": true,
    +                            "minItems": 2,
    +                            "maxItems": 2,
    +                            "uniqueItems": false,
    +                            "items": [
    +                                {
    +                                    "bsonType": "number",
    +                                    "description": "Location longitude\n",
    +                                    "minimum": -180,
    +                                    "maximum": 180
    +                                },
    +                                {
    +                                    "bsonType": "number",
    +                                    "description": "Location latitude\n",
    +                                    "minimum": -90,
    +                                    "maximum": 90
    +                                }
    +                            ]
    +                        },
    +                        "type": {
    +                            "bsonType": "string",
    +                            "description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**",
    +                            "enum": [
    +                                "Point"
    +                            ]
    +                        },
    +                        "country": {
    +                            "bsonType": "string",
    +                            "description": "String holding the country's name.\n"
    +                        },
    +                        "city": {
    +                            "bsonType": "string",
    +                            "description": "String holding the city's name."
    +                        },
    +                        "neighborhood": {
    +                            "bsonType": "string",
    +                            "description": "String holding the neighborhood's name."
    +                        },
    +                        "address": {
    +                            "bsonType": "string",
    +                            "description": "String holding the address (street, number and other details)."
    +                        }
    +                    },
    +                    "additionalProperties": false,
    +                    "required": [
    +                        "coordinates",
    +                        "type"
    +                    ]
    +                },
    +                "about": {
    +                    "bsonType": "string",
    +                    "description": "Small self-introduction, limited to 100 char"
    +                },
    +                "photo": {
    +                    "bsonType": "string",
    +                    "description": "URI with the location of the profile's photo."
    +                }
    +            },
    +            "oneOf": [
    +                {
    +                    "bsonType": "object",
    +                    "description": "Subschema representing a individual account.",
    +                    "properties": {
    +                        "type": {
    +                            "bsonType": "string",
    +                            "enum": [
    +                                "individual"
    +                            ]
    +                        },
    +                        "firstName": {
    +                            "bsonType": "string",
    +                            "description": "The first name of the user"
    +                        },
    +                        "lastName": {
    +                            "bsonType": "string",
    +                            "description": "The last name of the user. Optional field."
    +                        },
    +                        "needs": {
    +                            "bsonType": "object",
    +                            "description": "User's need in the app, representing what kind of help he/she needs",
    +                            "properties": {
    +                                "medicalHelp": {
    +                                    "bsonType": "bool",
    +                                    "description": "Flag to indicate wheter the user needs medical help. \nMarking this indicates he shows symptoms of COVID-19."
    +                                },
    +                                "otherHelp": {
    +                                    "bsonType": "bool",
    +                                    "description": "Flag to indicate wheter the user needs non-medical help, such as getting groceries, medice and etc.."
    +                                }
    +                            },
    +                            "additionalProperties": false,
    +                            "required": [
    +                                "medicalHelp",
    +                                "otherHelp"
    +                            ]
    +                        },
    +                        "objectives": {
    +                            "bsonType": "object",
    +                            "description": "Document with what are the objectives of the user through the application, such as donating, volunteering or sharing information.",
    +                            "properties": {
    +                                "volunteer": {
    +                                    "bsonType": "bool",
    +                                    "description": "Flag to indicate wheter the user wants to volunteer for iniciatives through the app."
    +                                },
    +                                "donate": {
    +                                    "bsonType": "bool",
    +                                    "description": "Flag to indicate wheter the user wants to donate for iniciatives through the app."
    +                                },
    +                                "shareInformation": {
    +                                    "bsonType": "bool",
    +                                    "description": "Flag to indicate wheter the user wants to share information through the app."
    +                                }
    +                            },
    +                            "additionalProperties": false,
    +                            "required": [
    +                                "volunteer",
    +                                "donate",
    +                                "shareInformation"
    +                            ]
    +                        },
    +                        "urls": {
    +                            "bsonType": "object",
    +                            "description": "Document holding the user urls to external websites and social networks",
    +                            "properties": {
    +                                "facebook": {
    +                                    "bsonType": "string",
    +                                    "description": "URL to user's Facebook page."
    +                                },
    +                                "linkedin": {
    +                                    "bsonType": "string",
    +                                    "description": "URL to user's Linkedin page."
    +                                },
    +                                "twitter": {
    +                                    "bsonType": "string",
    +                                    "description": "URL to user's Twitter page."
    +                                },
    +                                "github": {
    +                                    "bsonType": "string",
    +                                    "description": "URL to user's Github page."
    +                                },
    +                                "website": {
    +                                    "bsonType": "string",
    +                                    "description": "URL to user's personal website."
    +                                }
    +                            },
    +                            "additionalProperties": false
    +                        }
    +                    },
    +                    "additionalProperties": true,
    +                    "required": [
    +                        "type",
    +                        "firstName",
    +                        "needs"
    +                    ]
    +                },
    +                {
    +                    "bsonType": "object",
    +                    "description": "Subschema representing an organization (colective) account.",
    +                    "properties": {
    +                        "type": {
    +                            "bsonType": "string",
    +                            "description": "The type of the organization. Can be: Community, Government, Health care provider, Non-profit, Other, R&D, Startup, Traditional Company and University. All names are store in lowercase only.",
    +                            "enum": [
    +                                "startup",
    +                                "traditional company",
    +                                "community",
    +                                "government",
    +                                "r&d",
    +                                "non-profit",
    +                                "university",
    +                                "health care provider",
    +                                "other"
    +                            ]
    +                        },
    +                        "industry": {
    +                            "bsonType": "string",
    +                            "description": "Industry from which the organization participates. Plan is for this values to be scraped from linkedin industries."
    +                        },
    +                        "ownerId": {
    +                            "bsonType": "objectId",
    +                            "description": "_id of the user who owns the organization."
    +                        },
    +                        "name": {
    +                            "bsonType": "string",
    +                            "description": "Organization's name.\n"
    +                        },
    +                        "needs": {
    +                            "bsonType": "object",
    +                            "description": "Document with what are the objectives of the organization through the application, such as finding volunteers, staff, investors and donors.",
    +                            "properties": {
    +                                "volunteers": {
    +                                    "bsonType": "bool",
    +                                    "description": "Flag to indicate wheter the organization is seeking volunteers through the app."
    +                                },
    +                                "donations": {
    +                                    "bsonType": "bool",
    +                                    "description": "Flag to indicate wheter the organization is seeking donations through the app."
    +                                },
    +                                "staff": {
    +                                    "bsonType": "bool",
    +                                    "description": "Flag to indicate wheter the organization is seeking staff through the app."
    +                                },
    +                                "other": {
    +                                    "bsonType": "bool",
    +                                    "description": "Flag to indicate wheter the organization is seeking other needs through the app."
    +                                }
    +                            },
    +                            "additionalProperties": false,
    +                            "required": [
    +                                "volunteers",
    +                                "donations",
    +                                "staff",
    +                                "other"
    +                            ]
    +                        },
    +                        "global": {
    +                            "bsonType": "bool",
    +                            "description": "Flag to indicate wheter this organization is global."
    +                        },
    +                        "urls": {
    +                            "bsonType": "object",
    +                            "description": "Document holding external urls and refs to the organization such as social media profiles.",
    +                            "properties": {
    +                                "linkedin": {
    +                                    "bsonType": "string",
    +                                    "description": "URL to organization's Linkedin page."
    +                                },
    +                                "twitter": {
    +                                    "bsonType": "string",
    +                                    "description": "URL to organization's Twitter page."
    +                                },
    +                                "website": {
    +                                    "bsonType": "string",
    +                                    "description": "URL to organization's website."
    +                                },
    +                                "playstore": {
    +                                    "bsonType": "string",
    +                                    "description": "URL to organization's page at Google Play Store."
    +                                },
    +                                "appstore": {
    +                                    "bsonType": "string",
    +                                    "description": "URL to organization's page at Apple App Store"
    +                                }
    +                            },
    +                            "additionalProperties": false
    +                        },
    +                        "language": {
    +                            "bsonType": "string",
    +                            "description": "Field to inidicate the language used by the organization."
    +                        }
    +                    },
    +                    "additionalProperties": false,
    +                    "required": [
    +                        "type",
    +                        "industry",
    +                        "ownerId",
    +                        "name",
    +                        "needs"
    +                    ]
    +                }
    +            ],
    +            "anyOf": [
    +                {
    +                    "bsonType": "object",
    +                    "description": "Case where the user comes from social networks with a registration that uses email. In this case, the email field is required. This case covers the great majority of currently supported social network authentications.",
    +                    "properties": {
    +                        "email": {
    +                            "bsonType": "string",
    +                            "description": "User's email validated by a regex pattern."
    +                        }
    +                    },
    +                    "additionalProperties": true,
    +                    "required": [
    +                        "email"
    +                    ]
    +                },
    +                {
    +                    "bsonType": "object",
    +                    "description": "Case where the user comes from social networks with a registration that allows the use of only the phone. In this case, the phone field is required, and the email isn't. \n\nAn example of ocial network that falls into this case is Twitter.",
    +                    "properties": {
    +                        "phone": {
    +                            "bsonType": "string"
    +                        }
    +                    },
    +                    "additionalProperties": false,
    +                    "required": [
    +                        "phone"
    +                    ]
    +                }
    +            ],
    +            "required": [
    +                "createdAt",
    +                "_id",
    +                "updatedAt",
    +                "authId"
    +            ]
    +        }
    +    },
    +    "validationLevel": "off",
    +    "validationAction": "warn"
    +});
    3. Relationships
    3.1 Relationship CommentReferencesPost
    3.1.1 CommentReferencesPost Diagram
    Parent TableParent field
    comments _id
    Child TableChild field
    comments parentId
    3.1.2 CommentReferencesPost Properties
    PropertyValue
    Name CommentReferencesPost
    Description
    Parent Collectioncomments
    Parent field_id
    Parent Cardinality 1
    Child Collectioncomments
    Child fieldparentId
    Child Cardinality 1
    Comments
    3.2 Relationship PostHasComments
    3.2.1 PostHasComments Diagram
    Parent TableParent field
    posts _id
    Child TableChild field
    comments postId
    3.2.2 PostHasComments Properties
    PropertyValue
    Name PostHasComments
    Description Relationship between a Post and it's respective Comments made at it.
    Parent Collectionposts
    Parent field_id
    Parent Cardinality 1
    Child Collectioncomments
    Child fieldpostId
    Child Cardinality n
    Comments
    3.3 Relationship ThreadHasMessages
    3.3.1 ThreadHasMessages Diagram
    Parent TableParent field
    thread _id
    Child TableChild field
    messages threadId
    3.3.2 ThreadHasMessages Properties
    PropertyValue
    Name ThreadHasMessages
    Description
    Parent Collectionthread
    Parent field_id
    Parent Cardinality 1
    Child Collectionmessages
    Child fieldthreadId
    Child Cardinality 1
    Comments
    3.4 Relationship UserAuthorsComment
    3.4.1 UserAuthorsComment Diagram
    Parent TableParent field
    users _id
    Child TableChild field
    comments author.[-1].id
    3.4.2 UserAuthorsComment Properties
    PropertyValue
    Name UserAuthorsComment
    Description
    Parent Collectionusers
    Parent field_id
    Parent Cardinality 1
    Child Collectioncomments
    Child fieldid
    Child Cardinality 1
    Comments
    3.5 Relationship UserAuthorsPost
    3.5.1 UserAuthorsPost Diagram
    Parent TableParent field
    users _id
    Child TableChild field
    posts author.[-1].id
    3.5.2 UserAuthorsPost Properties
    PropertyValue
    Name UserAuthorsPost
    Description Relation between a User and the Post created by him/her.
    Parent Collectionusers
    Parent field_id
    Parent Cardinality 1
    Child Collectionposts
    Child fieldid
    Child Cardinality n
    Comments
    3.6 Relationship UserGivesFeedback
    3.6.1 UserGivesFeedback Diagram
    Parent TableParent field
    users _id
    Child TableChild field
    feedbacks userId
    3.6.2 UserGivesFeedback Properties
    PropertyValue
    Name UserGivesFeedback
    Description
    Parent Collectionusers
    Parent field_id
    Parent Cardinality 1
    Child Collectionfeedbacks
    Child fielduserId
    Child Cardinality 1
    Comments
    3.7 Relationship UserLikesComment
    3.7.1 UserLikesComment Diagram
    Parent TableParent field
    users _id
    Child TableChild field
    comments likes.[-1]
    3.7.2 UserLikesComment Properties
    PropertyValue
    Name UserLikesComment
    Description Relation to represent the User's who liked a Comment. + +Even though this is a N-N relation, we opt to store the ids only at the Comment side as an array of _id (with the _id of the users who liked it).
    Parent Collectionusers
    Parent field_id
    Parent Cardinality n
    Child Collectioncomments
    Child field
    Child Cardinality n
    Comments
    3.8 Relationship UserLikesPost
    3.8.1 UserLikesPost Diagram
    Parent TableParent field
    users _id
    Child TableChild field
    posts likes.[-1]
    3.8.2 UserLikesPost Properties
    PropertyValue
    Name UserLikesPost
    Description Relation to represent the User's who liked a Post. + +Even though this is a N-N relation, we opt to store the ids only at the Post side as an array of _id (with the _id of the users who liked it).
    Parent Collectionusers
    Parent field_id
    Parent Cardinality n
    Child Collectionposts
    Child field
    Child Cardinality n
    Comments
    3.9 Relationship UserOwnsOrganization
    3.9.1 UserOwnsOrganization Diagram
    Parent TableParent field
    users _id
    Child TableChild field
    users [-1].[-1].ownerId
    3.9.2 UserOwnsOrganization Properties
    PropertyValue
    Name UserOwnsOrganization
    Description Relation between an User and an Organization created by him/her. Initially projected as 1-N, with only one User owning the Organization, it is though to later on be evolved into N-N, with many Users being able to manage the Organization with different roles.
    Parent Collectionusers
    Parent field_id
    Parent Cardinality 1
    Child Collectionusers
    Child fieldownerId
    Child Cardinality n
    Comments
    3.10 Relationship UserSentMessage
    3.10.1 UserSentMessage Diagram
    Parent TableParent field
    users _id
    Child TableChild field
    messages authorId
    3.10.2 UserSentMessage Properties
    PropertyValue
    Name UserSentMessage
    Description
    Parent Collectionusers
    Parent field_id
    Parent Cardinality 1
    Child Collectionmessages
    Child fieldauthorId
    Child Cardinality 1
    Comments
    + + + + + + \ No newline at end of file diff --git a/v3/scripts/JSON_Document/applicationDB/comments.json b/v3/scripts/JSON_Document/applicationDB/comments.json new file mode 100644 index 0000000..5fa5b39 --- /dev/null +++ b/v3/scripts/JSON_Document/applicationDB/comments.json @@ -0,0 +1,27 @@ +{ + "_id": ObjectId("507f1f77bcf86cd799439011"), + "createdAt": ISODate("2016-04-08T15:06:21.595Z"), + "updatedAt": ISODate("2016-04-08T15:06:21.595Z"), + "author": { + "id": ObjectId("507f1f77bcf86cd799439011"), + "name": "Lorem", + "type": "Lorem", + "location": { + "coordinates": [ + 35.26, + -32.83 + ], + "type": "Point", + "country": "Lorem", + "city": "Lorem", + "neighborhood": "Lorem", + "address": "Lorem" + } + }, + "postId": ObjectId("507f1f77bcf86cd799439011"), + "parentId": ObjectId("507f1f77bcf86cd799439011"), + "content": "Lorem", + "likes": [ + ObjectId("507f1f77bcf86cd799439011") + ] +} \ No newline at end of file diff --git a/v3/scripts/JSON_Document/applicationDB/feedbacks.json b/v3/scripts/JSON_Document/applicationDB/feedbacks.json new file mode 100644 index 0000000..46b155a --- /dev/null +++ b/v3/scripts/JSON_Document/applicationDB/feedbacks.json @@ -0,0 +1,24 @@ +{ + "createdAt": ISODate("2016-04-08T15:06:21.595Z"), + "_id": ObjectId("507f1f77bcf86cd799439011"), + "updatedAt": ISODate("2016-04-08T15:06:21.595Z"), + "rating": 1, + "ipAddress": "192.168.0.1", + "age": 8528994625872795000, + "mostValuableFeature": "Lorem", + "whatWouldChange": "Lorem", + "generalFeedback": "Lorem", + "covidImpact": "Lorem", + "userId": ObjectId("507f1f77bcf86cd799439011"), + "location": { + "coordinates": [ + 35.26, + -32.83 + ], + "type": "Point", + "country": "Lorem", + "city": "Lorem", + "neighborhood": "Lorem", + "address": "Lorem" + } +} \ No newline at end of file diff --git a/v3/scripts/JSON_Document/applicationDB/messages.json b/v3/scripts/JSON_Document/applicationDB/messages.json new file mode 100644 index 0000000..fd6c6b3 --- /dev/null +++ b/v3/scripts/JSON_Document/applicationDB/messages.json @@ -0,0 +1,31 @@ +{ + "_id": ObjectId("507f1f77bcf86cd799439011"), + "createdAt": ISODate("2016-04-08T15:06:21.595Z"), + "updatedAt": ISODate("2016-04-08T15:06:21.595Z"), + "authorId": ObjectId("507f1f77bcf86cd799439011"), + "content": "Lorem", + "threadId": ObjectId("507f1f77bcf86cd799439011"), + "status": "sent", + "postRef": { + "id": ObjectId("507f1f77bcf86cd799439011"), + "objective": "offer", + "title": "Lorem", + "content": "Lorem", + "author": { + "id": ObjectId("507f1f77bcf86cd799439011"), + "name": "Lorem", + "type": "Lorem", + "location": { + "coordinates": [ + 35.26, + -32.83 + ], + "type": "Point", + "country": "Lorem", + "city": "Lorem", + "neighborhood": "Lorem", + "address": "Lorem" + } + } + } +} \ No newline at end of file diff --git a/v3/scripts/JSON_Document/applicationDB/posts.json b/v3/scripts/JSON_Document/applicationDB/posts.json new file mode 100644 index 0000000..9d61871 --- /dev/null +++ b/v3/scripts/JSON_Document/applicationDB/posts.json @@ -0,0 +1,41 @@ +{ + "_id": ObjectId("507f1f77bcf86cd799439011"), + "createdAt": ISODate("2016-04-08T15:06:21.595Z"), + "updatedAt": ISODate("2016-04-08T15:06:21.595Z"), + "expireAt": ISODate("2016-04-08T15:06:21.595Z"), + "author": { + "id": ObjectId("507f1f77bcf86cd799439011"), + "name": "Lorem", + "type": "Lorem", + "location": { + "coordinates": [ + 35.26, + -32.83 + ], + "type": "Point", + "country": "Lorem", + "city": "Lorem", + "neighborhood": "Lorem", + "address": "Lorem" + } + }, + "title": "Lorem", + "content": "Lorem", + "objective": "offer", + "visibility": "worldwide", + "likes": [ + ObjectId("507f1f77bcf86cd799439011") + ], + "types": [ + "Groceries/Food" + ], + "language": [ + "Lorem" + ], + "externalLinks": { + "email": "Lorem", + "website": "Lorem", + "playStore": "Lorem", + "appStore": "Lorem" + } +} \ No newline at end of file diff --git a/v3/scripts/JSON_Document/applicationDB/thread.json b/v3/scripts/JSON_Document/applicationDB/thread.json new file mode 100644 index 0000000..fc48791 --- /dev/null +++ b/v3/scripts/JSON_Document/applicationDB/thread.json @@ -0,0 +1,16 @@ +{ + "_id": ObjectId("507f1f77bcf86cd799439011"), + "createdAt": ISODate("2016-04-08T15:06:21.595Z"), + "updatedAt": ISODate("2016-04-08T15:06:21.595Z"), + "status": "pending", + "participants": [ + { + "id": ObjectId("507f1f77bcf86cd799439011"), + "name": "Lorem", + "type": "Lorem", + "newMessages": false, + "lastAccess": ISODate("2016-04-08T15:06:21.595Z"), + "photo": "./resource.txt#frag01" + } + ] +} \ No newline at end of file diff --git a/v3/scripts/JSON_Document/applicationDB/users.json b/v3/scripts/JSON_Document/applicationDB/users.json new file mode 100644 index 0000000..96384f5 --- /dev/null +++ b/v3/scripts/JSON_Document/applicationDB/users.json @@ -0,0 +1,39 @@ +{ + "createdAt": ISODate("2016-04-08T15:06:21.595Z"), + "_id": ObjectId("507f1f77bcf86cd799439011"), + "updatedAt": ISODate("2016-04-08T15:06:21.595Z"), + "authId": "Lorem", + "location": { + "coordinates": [ + 35.26, + -32.83 + ], + "type": "Point", + "country": "Lorem", + "city": "Lorem", + "neighborhood": "Lorem", + "address": "Lorem" + }, + "about": "Lorem", + "photo": "./resource.txt#frag01", + "type": "other", + "industry": "Lorem", + "ownerId": ObjectId("507f1f77bcf86cd799439011"), + "name": "Lorem", + "needs": { + "volunteers": true, + "donations": false, + "staff": false, + "other": false + }, + "global": false, + "urls": { + "linkedin": "http://linkedin.com/in/myProfile", + "twitter": "http://twitter.com/myProfile", + "website": "http://mypersonalwebsite.com", + "playstore": "http://playstore.com/myOrg", + "appstore": "http://appstore.com/myOrg" + }, + "language": "Lorem", + "email": "test_user@fightpandemics.com" +} \ No newline at end of file diff --git a/v3/scripts/JSON_Schema/applicationDB/comments.json b/v3/scripts/JSON_Schema/applicationDB/comments.json new file mode 100644 index 0000000..e512327 --- /dev/null +++ b/v3/scripts/JSON_Schema/applicationDB/comments.json @@ -0,0 +1,138 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "title": "comments", + "additionalProperties": false, + "properties": { + "_id": { + "type": "string", + "description": "Automatically generated object_id as primary key.", + "pattern": "^[a-fA-F0-9]{24}$" + }, + "createdAt": { + "type": "string", + "description": "Timestamp with the comment's creation date", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "description": "Timestamp with the comment's last update date", + "format": "date-time" + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Foreign key to the user who created the post.", + "pattern": "^[a-fA-F0-9]{24}$" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "location": { + "type": "object", + "properties": { + "coordinates": { + "type": "array", + "additionalItems": true, + "minItems": 2, + "maxItems": 2, + "uniqueItems": false, + "description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.", + "items": [ + { + "type": "number", + "minimum": -180, + "maximum": 180, + "default": 0, + "description": "Location longitude\n", + "id": "lng" + }, + { + "type": "number", + "minimum": -90, + "maximum": 90, + "default": 0, + "description": "Location latitude\n", + "id": "lat" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Point" + ], + "description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**" + }, + "country": { + "type": "string", + "description": "String holding the country's name.\n" + }, + "city": { + "type": "string", + "description": "String holding the city's name." + }, + "neighborhood": { + "type": "string", + "description": "String holding the neighborhood's name." + }, + "address": { + "type": "string", + "description": "String holding the address (street, number and other details)." + } + }, + "additionalProperties": false, + "description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.", + "required": [ + "coordinates", + "type" + ] + } + }, + "additionalProperties": false, + "required": [ + "id", + "name", + "type", + "location" + ] + }, + "postId": { + "type": "string", + "pattern": "^[a-fA-F0-9]{24}$" + }, + "parentId": { + "type": "string", + "description": "If the comment is nested (in another comment), this field will hold the _id of the parent comment. Optional field, where being blank means it is a root comment.", + "pattern": "^[a-fA-F0-9]{24}$" + }, + "content": { + "type": "string", + "description": "Stirng holding the comment's content." + }, + "likes": { + "type": "array", + "description": "Array holding the user_id of all the users who liked the comment.", + "additionalItems": true, + "uniqueItems": true, + "items": { + "type": "string", + "description": "_id of the user who liked the comment", + "pattern": "^[a-fA-F0-9]{24}$" + } + } + }, + "required": [ + "_id", + "createdAt", + "updatedAt", + "author", + "postId", + "content" + ] +} \ No newline at end of file diff --git a/v3/scripts/JSON_Schema/applicationDB/feedbacks.json b/v3/scripts/JSON_Schema/applicationDB/feedbacks.json new file mode 100644 index 0000000..0f7c094 --- /dev/null +++ b/v3/scripts/JSON_Schema/applicationDB/feedbacks.json @@ -0,0 +1,128 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "title": "feedbacks", + "description": "Collection to hold feedback on the application.\n\nThis may be done with the user logged or not and, depending on that, we may or may not have a reference to the user in question at this model.", + "additionalProperties": false, + "properties": { + "createdAt": { + "type": "string", + "description": "Timestamp with the feedback's creation date", + "format": "date-time" + }, + "_id": { + "type": "string", + "description": "Automatically generated object_id as primary key.", + "pattern": "^[a-fA-F0-9]{24}$" + }, + "updatedAt": { + "type": "string", + "description": "Timestamp with the feedback's last update date", + "format": "date-time" + }, + "rating": { + "type": "number", + "description": "A rating, in a scale of 1 to 5, of the application.\n\nCurrently present as: \"How well does FIghtPandemics meet your needs?\".\n\nPresent in the first part of the feedback and, therefore, is required.", + "minimum": 1, + "maximum": 5 + }, + "ipAddress": { + "type": "string", + "description": "Caputred IP address in order to get user's location even if they are not logged.\n\nCaptured at the first part of the feedback and, therefore, is required.", + "format": "ipv4" + }, + "age": { + "type": "integer", + "description": "User's age.\n\nCurrently present as: \"What is your age?\".\n\nPresent in the third part of the feedback and, therefore, not required.", + "minimum": 18 + }, + "mostValuableFeature": { + "type": "string", + "description": "User's feedback into what is the features most valuable for him/her.\n\nCurrently present as: \"Which features are the most valuable for you?\".\n\nPresent in the second part of the feedback and, therefore, not required." + }, + "whatWouldChange": { + "type": "string", + "description": "User's feedback into what he/she would change about the application.\n\nCurrently present as: \"If you could change one thing about FightPandemics, what would it be?\".\n\nPresent in the second part of the feedback and, therefore, not required." + }, + "generalFeedback": { + "type": "string", + "description": "User's general feedback section.\n\nCurrently present as: \"Any other feedback for us?\".\n\nPresent in the second part of the feedback and, therefore, not required." + }, + "covidImpact": { + "type": "string", + "description": "User's feedback into how the COVID impacted him.\n\nCurrently present as a multiple choice question.\n\n**Question:** \"How has COVID-19 impacted you?\"\n\n**Options:** \n\n1. I go to work/school normally\n2. I am healthy but in a stay-at-home quarentine\n3. I have mild symptoms but haven't been tested\n4. I am diagnosed with COVID-19\n\n\nPresent in the second part of the feedback and, therefore, not required." + }, + "userId": { + "type": "string", + "description": "Reference to the user's _id.\n\nThis will be present only if the user was logged in when completing the feedback.", + "pattern": "^[a-fA-F0-9]{24}$" + }, + "location": { + "type": "object", + "properties": { + "coordinates": { + "type": "array", + "additionalItems": true, + "minItems": 2, + "maxItems": 2, + "uniqueItems": false, + "description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.", + "items": [ + { + "type": "number", + "minimum": -180, + "maximum": 180, + "default": 0, + "description": "Location longitude\n", + "id": "lng" + }, + { + "type": "number", + "minimum": -90, + "maximum": 90, + "default": 0, + "description": "Location latitude\n", + "id": "lat" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Point" + ], + "description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**" + }, + "country": { + "type": "string", + "description": "String holding the country's name.\n" + }, + "city": { + "type": "string", + "description": "String holding the city's name." + }, + "neighborhood": { + "type": "string", + "description": "String holding the neighborhood's name." + }, + "address": { + "type": "string", + "description": "String holding the address (street, number and other details)." + } + }, + "additionalProperties": false, + "description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.", + "required": [ + "coordinates", + "type" + ] + } + }, + "required": [ + "createdAt", + "_id", + "updatedAt", + "rating", + "ipAddress" + ] +} \ No newline at end of file diff --git a/v3/scripts/JSON_Schema/applicationDB/messages.json b/v3/scripts/JSON_Schema/applicationDB/messages.json new file mode 100644 index 0000000..bbfa391 --- /dev/null +++ b/v3/scripts/JSON_Schema/applicationDB/messages.json @@ -0,0 +1,174 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "title": "messages", + "description": "Message sent in a private conversation\n", + "additionalProperties": false, + "properties": { + "_id": { + "type": "string", + "description": "ObjectId used as primary key for a message", + "pattern": "^[a-fA-F0-9]{24}$" + }, + "createdAt": { + "type": "string", + "description": "Timestamp with message's creation date", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "description": "Timestamp with message's update date", + "format": "date-time" + }, + "authorId": { + "type": "string", + "description": "ObjectId of the user who sent the message", + "pattern": "^[a-fA-F0-9]{24}$" + }, + "content": { + "type": "string", + "description": "Messages content, containing html links and emojis " + }, + "threadId": { + "type": "string", + "description": "Reference to the thread were the message was sent", + "pattern": "^[a-fA-F0-9]{24}$" + }, + "status": { + "type": "string", + "description": "Curerent message status, used to define if it was edited or deleted:\n\n* **sent**: message was sent and not edited or deleted.\n* **edited**: message was edited by the author\n* **deleted**: message was deleted by the author", + "default": "sent", + "enum": [ + "edited", + "deleted", + "sent" + ] + }, + "postRef": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^[a-fA-F0-9]{24}$" + }, + "objective": { + "type": "string", + "enum": [ + "request", + "offer" + ], + "description": "Field to indicate the post's objective.\nCurrently only two values allowed: \"offering help\" and \"looking for help\"." + }, + "title": { + "type": "string", + "description": "The post title." + }, + "content": { + "type": "string", + "description": "String for the post content." + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Foreign key to the user who created the post.", + "pattern": "^[a-fA-F0-9]{24}$" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "location": { + "type": "object", + "properties": { + "coordinates": { + "type": "array", + "additionalItems": true, + "minItems": 2, + "maxItems": 2, + "uniqueItems": false, + "description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.", + "items": [ + { + "type": "number", + "minimum": -180, + "maximum": 180, + "default": 0, + "description": "Location longitude\n", + "id": "lng" + }, + { + "type": "number", + "minimum": -90, + "maximum": 90, + "default": 0, + "description": "Location latitude\n", + "id": "lat" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Point" + ], + "description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**" + }, + "country": { + "type": "string", + "description": "String holding the country's name.\n" + }, + "city": { + "type": "string", + "description": "String holding the city's name." + }, + "neighborhood": { + "type": "string", + "description": "String holding the neighborhood's name." + }, + "address": { + "type": "string", + "description": "String holding the address (street, number and other details)." + } + }, + "additionalProperties": false, + "description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.", + "required": [ + "coordinates", + "type" + ] + } + }, + "additionalProperties": false, + "required": [ + "id", + "name", + "type", + "location" + ] + } + }, + "additionalProperties": false, + "description": "Optional post reference, allowing a post to be referenced in a message thread.", + "required": [ + "id", + "objective", + "title", + "content", + "author" + ] + } + }, + "required": [ + "_id", + "createdAt", + "updatedAt", + "authorId", + "content", + "threadId", + "status" + ] +} \ No newline at end of file diff --git a/v3/scripts/JSON_Schema/applicationDB/posts.json b/v3/scripts/JSON_Schema/applicationDB/posts.json new file mode 100644 index 0000000..ea0c097 --- /dev/null +++ b/v3/scripts/JSON_Schema/applicationDB/posts.json @@ -0,0 +1,211 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "title": "posts", + "description": "Document to represent a post, asking or offering help to be displayed on the feed", + "additionalProperties": false, + "properties": { + "_id": { + "type": "string", + "pattern": "^[a-fA-F0-9]{24}$" + }, + "createdAt": { + "type": "string", + "description": "Timestamp with the post's creation date", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "description": "Timestamp with the post's last update date", + "format": "date-time" + }, + "expireAt": { + "type": "string", + "description": "Timestamp with the date the post will expire.\nIf no expiration date is present, the post does not expire.", + "format": "date-time" + }, + "author": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Foreign key to the user who created the post.", + "pattern": "^[a-fA-F0-9]{24}$" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "location": { + "type": "object", + "properties": { + "coordinates": { + "type": "array", + "additionalItems": true, + "minItems": 2, + "maxItems": 2, + "uniqueItems": false, + "description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.", + "items": [ + { + "type": "number", + "minimum": -180, + "maximum": 180, + "default": 0, + "description": "Location longitude\n", + "id": "lng" + }, + { + "type": "number", + "minimum": -90, + "maximum": 90, + "default": 0, + "description": "Location latitude\n", + "id": "lat" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Point" + ], + "description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**" + }, + "country": { + "type": "string", + "description": "String holding the country's name.\n" + }, + "city": { + "type": "string", + "description": "String holding the city's name." + }, + "neighborhood": { + "type": "string", + "description": "String holding the neighborhood's name." + }, + "address": { + "type": "string", + "description": "String holding the address (street, number and other details)." + } + }, + "additionalProperties": false, + "description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.", + "required": [ + "coordinates", + "type" + ] + } + }, + "additionalProperties": false, + "required": [ + "id", + "name", + "type", + "location" + ] + }, + "title": { + "type": "string", + "description": "The post title." + }, + "content": { + "type": "string", + "description": "String for the post content." + }, + "objective": { + "type": "string", + "description": "Field to indicate the post's objective.\nCurrently only two values allowed: \"offering help\" and \"looking for help\".", + "enum": [ + "request", + "offer" + ] + }, + "visibility": { + "type": "string", + "description": "Field to specify the post's visibility. It can be: worldwide, country, state and zipcode.", + "enum": [ + "zipcode", + "state", + "country", + "worldwide" + ] + }, + "likes": { + "type": "array", + "description": "Array holding the user_id of all the users who liked the post.", + "additionalItems": true, + "uniqueItems": true, + "items": { + "type": "string", + "description": "_id of the user who liked the post", + "pattern": "^[a-fA-F0-9]{24}$" + } + }, + "types": { + "type": "array", + "description": "Array with the post's tags.\nCan be: Medical Supplies, Groceries/Food, Business, Education, Legal, Wellbeing/Mental, Entertainment, Information, Funding, R&D and Others", + "additionalItems": true, + "uniqueItems": false, + "items": { + "type": "string", + "enum": [ + "Medical Supplies", + "Groceries/Food", + "Business", + "Education", + "Legal", + "Wellbeing/Mental", + "Entertainment", + "Information", + "Funding", + "R&D", + "Others" + ] + } + }, + "language": { + "type": "array", + "additionalItems": true, + "uniqueItems": false, + "items": { + "type": "string" + } + }, + "externalLinks": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "An email related to the post's content." + }, + "website": { + "type": "string", + "description": "Link for a website related to the post's content." + }, + "playStore": { + "type": "string", + "description": "Link for a Play Store application related to the post's content." + }, + "appStore": { + "type": "string", + "description": "Link for a AppStore application related to the post's content." + } + }, + "additionalProperties": false + } + }, + "required": [ + "_id", + "createdAt", + "updatedAt", + "author", + "title", + "content", + "objective", + "visibility", + "likes" + ] +} \ No newline at end of file diff --git a/v3/scripts/JSON_Schema/applicationDB/thread.json b/v3/scripts/JSON_Schema/applicationDB/thread.json new file mode 100644 index 0000000..63c7c51 --- /dev/null +++ b/v3/scripts/JSON_Schema/applicationDB/thread.json @@ -0,0 +1,89 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "title": "thread", + "description": "ObjectId that serves as primary key for the message thread.", + "additionalProperties": false, + "properties": { + "_id": { + "type": "string", + "pattern": "^[a-fA-F0-9]{24}$" + }, + "createdAt": { + "type": "string", + "description": "Timestamp with the threads's creation date", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "description": "Timestamp with the thread's update date", + "format": "date-time" + }, + "status": { + "type": "string", + "description": "Curerent thread status, used to define archives, soft deletes and other conversation status. The statuses are:\n\n* **pending**: if the user didn't accept the message request yet\n* **blocked**: if the one of the user's blocked the other\n* **accepted**: message request was accepted and users exchange messages\n* **archived**: user archived the message thread\n", + "default": "pending", + "enum": [ + "blocked", + "accepted", + "pending", + "archived" + ] + }, + "participants": { + "type": "array", + "description": "Array of user reference's, containing the participants of the message thread.\n\nIt is modelled as an array to allow expansion to group chats in the future.", + "additionalItems": true, + "minItems": 2, + "uniqueItems": false, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Foreign key to the user who created the post.", + "pattern": "^[a-fA-F0-9]{24}$" + }, + "name": { + "type": "string", + "description": "User's name" + }, + "type": { + "type": "string", + "description": "User's type" + }, + "newMessages": { + "type": "boolean", + "description": "Flag to indicate whether there are new messages since last time the user accessed the thread.", + "default": false + }, + "lastAccess": { + "type": "string", + "description": "Timestamp with the last time the user accessed the message thread.", + "format": "date-time" + }, + "photo": { + "type": "string", + "description": "URL with the user photo", + "format": "uri" + } + }, + "additionalProperties": false, + "required": [ + "id", + "name", + "type", + "newMessages", + "lastAccess" + ] + } + } + }, + "required": [ + "_id", + "createdAt", + "updatedAt", + "status", + "participants" + ] +} \ No newline at end of file diff --git a/v3/scripts/JSON_Schema/applicationDB/users.json b/v3/scripts/JSON_Schema/applicationDB/users.json new file mode 100644 index 0000000..6ae6f75 --- /dev/null +++ b/v3/scripts/JSON_Schema/applicationDB/users.json @@ -0,0 +1,361 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "title": "users", + "description": "Collection that holds all the data on system's users. \n\nThe users can be of **two types**: **(1) Individual**, representing a private user account; and **(2) Organization**, representing an organization of various types.\n\nThe field 'type' is used to differentiate between the two subschemas, with 'individual' representing private user accounts and \"Community\", \"Government\", \"Health care provider\", \"Non-profit\", \"Other\", \"R&D\", \"Startup\", \"Traditional Company\" and \"University\".", + "additionalProperties": true, + "properties": { + "createdAt": { + "type": "string", + "description": "Timestamp with the user's creation date", + "format": "date-time" + }, + "_id": { + "type": "string", + "description": "Automatically generated _it as primary key.", + "pattern": "^[a-fA-F0-9]{24}$" + }, + "updatedAt": { + "type": "string", + "description": "Timestamp indicating last update on the database.", + "format": "date-time" + }, + "authId": { + "type": "string", + "description": "String holding the authentication service id (Auth0).\n\nThis field is a **foreign key to the user in the Auth0 database**, connecting through the user_id field." + }, + "location": { + "type": "object", + "properties": { + "coordinates": { + "type": "array", + "additionalItems": true, + "minItems": 2, + "maxItems": 2, + "uniqueItems": false, + "description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.", + "items": [ + { + "type": "number", + "minimum": -180, + "maximum": 180, + "default": 0, + "description": "Location longitude\n", + "id": "lng" + }, + { + "type": "number", + "minimum": -90, + "maximum": 90, + "default": 0, + "description": "Location latitude\n", + "id": "lat" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "Point" + ], + "description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**" + }, + "country": { + "type": "string", + "description": "String holding the country's name.\n" + }, + "city": { + "type": "string", + "description": "String holding the city's name." + }, + "neighborhood": { + "type": "string", + "description": "String holding the neighborhood's name." + }, + "address": { + "type": "string", + "description": "String holding the address (street, number and other details)." + } + }, + "additionalProperties": false, + "description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.", + "required": [ + "coordinates", + "type" + ] + }, + "about": { + "type": "string", + "description": "Small self-introduction, limited to 100 char" + }, + "photo": { + "type": "string", + "description": "URI with the location of the profile's photo.", + "format": "uri" + } + }, + "oneOf": [ + { + "id": "individual", + "type": "object", + "description": "Subschema representing a individual account.", + "properties": { + "type": { + "type": "string", + "enum": [ + "individual" + ] + }, + "firstName": { + "type": "string", + "description": "The first name of the user" + }, + "lastName": { + "type": "string", + "description": "The last name of the user. Optional field." + }, + "needs": { + "type": "object", + "description": "User's need in the app, representing what kind of help he/she needs", + "properties": { + "medicalHelp": { + "type": "boolean", + "description": "Flag to indicate wheter the user needs medical help. \nMarking this indicates he shows symptoms of COVID-19.", + "default": false + }, + "otherHelp": { + "type": "boolean", + "description": "Flag to indicate wheter the user needs non-medical help, such as getting groceries, medice and etc..", + "default": false + } + }, + "additionalProperties": false, + "required": [ + "medicalHelp", + "otherHelp" + ] + }, + "objectives": { + "type": "object", + "description": "Document with what are the objectives of the user through the application, such as donating, volunteering or sharing information.", + "properties": { + "volunteer": { + "type": "boolean", + "description": "Flag to indicate wheter the user wants to volunteer for iniciatives through the app.", + "default": false + }, + "donate": { + "type": "boolean", + "description": "Flag to indicate wheter the user wants to donate for iniciatives through the app.", + "default": false + }, + "shareInformation": { + "type": "boolean", + "description": "Flag to indicate wheter the user wants to share information through the app.", + "default": true + } + }, + "additionalProperties": false, + "required": [ + "volunteer", + "donate", + "shareInformation" + ] + }, + "urls": { + "type": "object", + "description": "Document holding the user urls to external websites and social networks", + "properties": { + "facebook": { + "type": "string", + "description": "URL to user's Facebook page.", + "format": "uri" + }, + "linkedin": { + "type": "string", + "description": "URL to user's Linkedin page.", + "format": "uri" + }, + "twitter": { + "type": "string", + "description": "URL to user's Twitter page.", + "format": "uri" + }, + "github": { + "type": "string", + "description": "URL to user's Github page.", + "format": "uri" + }, + "website": { + "type": "string", + "description": "URL to user's personal website.", + "format": "uri" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": true, + "required": [ + "type", + "firstName", + "needs" + ] + }, + { + "id": "organization", + "type": "object", + "description": "Subschema representing an organization (colective) account.", + "properties": { + "type": { + "type": "string", + "description": "The type of the organization. Can be: Community, Government, Health care provider, Non-profit, Other, R&D, Startup, Traditional Company and University. All names are store in lowercase only.", + "enum": [ + "startup", + "traditional company", + "community", + "government", + "r&d", + "non-profit", + "university", + "health care provider", + "other" + ] + }, + "industry": { + "type": "string", + "description": "Industry from which the organization participates. Plan is for this values to be scraped from linkedin industries." + }, + "ownerId": { + "type": "string", + "description": "_id of the user who owns the organization.", + "pattern": "^[a-fA-F0-9]{24}$" + }, + "name": { + "type": "string", + "description": "Organization's name.\n" + }, + "needs": { + "type": "object", + "description": "Document with what are the objectives of the organization through the application, such as finding volunteers, staff, investors and donors.", + "properties": { + "volunteers": { + "type": "boolean", + "description": "Flag to indicate wheter the organization is seeking volunteers through the app.", + "default": false + }, + "donations": { + "type": "boolean", + "description": "Flag to indicate wheter the organization is seeking donations through the app.", + "default": false + }, + "staff": { + "type": "boolean", + "description": "Flag to indicate wheter the organization is seeking staff through the app.", + "default": false + }, + "other": { + "type": "boolean", + "description": "Flag to indicate wheter the organization is seeking other needs through the app.", + "default": false + } + }, + "additionalProperties": false, + "required": [ + "volunteers", + "donations", + "staff", + "other" + ] + }, + "global": { + "type": "boolean", + "description": "Flag to indicate wheter this organization is global.", + "default": false + }, + "urls": { + "type": "object", + "description": "Document holding external urls and refs to the organization such as social media profiles.", + "properties": { + "linkedin": { + "type": "string", + "description": "URL to organization's Linkedin page.", + "format": "uri" + }, + "twitter": { + "type": "string", + "description": "URL to organization's Twitter page.", + "format": "uri" + }, + "website": { + "type": "string", + "description": "URL to organization's website.", + "format": "uri" + }, + "playstore": { + "type": "string", + "description": "URL to organization's page at Google Play Store.", + "format": "uri" + }, + "appstore": { + "type": "string", + "description": "URL to organization's page at Apple App Store", + "format": "uri" + } + }, + "additionalProperties": false + }, + "language": { + "type": "string", + "description": "Field to inidicate the language used by the organization." + } + }, + "additionalProperties": false, + "required": [ + "type", + "industry", + "ownerId", + "name", + "needs" + ] + } + ], + "anyOf": [ + { + "id": "emailPK", + "type": "object", + "description": "Case where the user comes from social networks with a registration that uses email. In this case, the email field is required. This case covers the great majority of currently supported social network authentications.", + "properties": { + "email": { + "type": "string", + "description": "User's email validated by a regex pattern.", + "format": "email" + } + }, + "additionalProperties": true, + "required": [ + "email" + ] + }, + { + "id": "phonePK", + "type": "object", + "description": "Case where the user comes from social networks with a registration that allows the use of only the phone. In this case, the phone field is required, and the email isn't. \n\nAn example of ocial network that falls into this case is Twitter.", + "properties": { + "phone": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "phone" + ] + } + ], + "required": [ + "createdAt", + "_id", + "updatedAt", + "authId" + ] +} \ No newline at end of file diff --git a/v3/scripts/MongoDB_Script/applicationDB/comments.js b/v3/scripts/MongoDB_Script/applicationDB/comments.js new file mode 100644 index 0000000..e594d6d --- /dev/null +++ b/v3/scripts/MongoDB_Script/applicationDB/comments.js @@ -0,0 +1,147 @@ +use applicationDB; + +db.createCollection( "comments",{ + "storageEngine": { + "wiredTiger": {} + }, + "capped": false, + "validator": { + "$jsonSchema": { + "bsonType": "object", + "title": "comments", + "additionalProperties": false, + "properties": { + "_id": { + "bsonType": "objectId", + "description": "Automatically generated object_id as primary key." + }, + "createdAt": { + "bsonType": "date", + "description": "Timestamp with the comment's creation date" + }, + "updatedAt": { + "bsonType": "date", + "description": "Timestamp with the comment's last update date" + }, + "author": { + "bsonType": "object", + "properties": { + "id": { + "bsonType": "objectId", + "description": "Foreign key to the user who created the post." + }, + "name": { + "bsonType": "string" + }, + "type": { + "bsonType": "string" + }, + "location": { + "bsonType": "object", + "description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.", + "properties": { + "coordinates": { + "bsonType": "array", + "description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.", + "additionalItems": true, + "minItems": 2, + "maxItems": 2, + "uniqueItems": false, + "items": [ + { + "bsonType": "number", + "description": "Location longitude\n", + "minimum": -180, + "maximum": 180 + }, + { + "bsonType": "number", + "description": "Location latitude\n", + "minimum": -90, + "maximum": 90 + } + ] + }, + "type": { + "bsonType": "string", + "description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**", + "enum": [ + "Point" + ] + }, + "country": { + "bsonType": "string", + "description": "String holding the country's name.\n" + }, + "city": { + "bsonType": "string", + "description": "String holding the city's name." + }, + "neighborhood": { + "bsonType": "string", + "description": "String holding the neighborhood's name." + }, + "address": { + "bsonType": "string", + "description": "String holding the address (street, number and other details)." + } + }, + "additionalProperties": false, + "required": [ + "coordinates", + "type" + ] + } + }, + "additionalProperties": false, + "required": [ + "id", + "name", + "type" + ] + }, + "postId": { + "bsonType": "objectId" + }, + "parentId": { + "bsonType": "objectId", + "description": "If the comment is nested (in another comment), this field will hold the _id of the parent comment. Optional field, where being blank means it is a root comment." + }, + "content": { + "bsonType": "string", + "description": "Stirng holding the comment's content." + }, + "likes": { + "bsonType": "array", + "description": "Array holding the user_id of all the users who liked the comment.", + "additionalItems": true, + "uniqueItems": true, + "items": { + "bsonType": "objectId", + "description": "_id of the user who liked the comment" + } + } + }, + "required": [ + "_id", + "createdAt", + "updatedAt", + "author", + "postId", + "content" + ] + } + }, + "validationLevel": "off", + "validationAction": "warn" +}); +db.comments.createIndex( +{ + "createdAt": 1, + "parentId": 1, + "postId": 1 +}, +{ + "name": "New Index" +} +); \ No newline at end of file diff --git a/v3/scripts/MongoDB_Script/applicationDB/feedbacks.js b/v3/scripts/MongoDB_Script/applicationDB/feedbacks.js new file mode 100644 index 0000000..1073d2b --- /dev/null +++ b/v3/scripts/MongoDB_Script/applicationDB/feedbacks.js @@ -0,0 +1,130 @@ +use applicationDB; + +db.createCollection( "feedbacks",{ + "storageEngine": { + "wiredTiger": {} + }, + "capped": false, + "validator": { + "$jsonSchema": { + "bsonType": "object", + "title": "feedbacks", + "description": "Collection to hold feedback on the application.\n\nThis may be done with the user logged or not and, depending on that, we may or may not have a reference to the user in question at this model.", + "additionalProperties": false, + "properties": { + "_id": { + "bsonType": "objectId", + "description": "Automatically generated object_id as primary key." + }, + "createdAt": { + "bsonType": "date", + "description": "Timestamp with the feedback's creation date" + }, + "updatedAt": { + "bsonType": "date", + "description": "Timestamp with the feedback's last update date" + }, + "rating": { + "bsonType": "number", + "description": "A rating, in a scale of 1 to 5, of the application.\n\nCurrently present as: \"How well does FIghtPandemics meet your needs?\".\n\nPresent in the first part of the feedback and, therefore, is required.", + "minimum": 1, + "maximum": 5 + }, + "ipAddress": { + "bsonType": "string", + "description": "Caputred IP address in order to get user's location even if they are not logged.\n\nCaptured at the first part of the feedback and, therefore, is required." + }, + "age": { + "bsonType": "long", + "description": "User's age.\n\nCurrently present as: \"What is your age?\".\n\nPresent in the third part of the feedback and, therefore, not required.", + "minimum": 18 + }, + "mostValuableFeature": { + "bsonType": "string", + "description": "User's feedback into what is the features most valuable for him/her.\n\nCurrently present as: \"Which features are the most valuable for you?\".\n\nPresent in the second part of the feedback and, therefore, not required." + }, + "whatWouldChange": { + "bsonType": "string", + "description": "User's feedback into what he/she would change about the application.\n\nCurrently present as: \"If you could change one thing about FightPandemics, what would it be?\".\n\nPresent in the second part of the feedback and, therefore, not required." + }, + "generalFeedback": { + "bsonType": "string", + "description": "User's general feedback section.\n\nCurrently present as: \"Any other feedback for us?\".\n\nPresent in the second part of the feedback and, therefore, not required." + }, + "covidImpact": { + "bsonType": "string", + "description": "User's feedback into how the COVID impacted him.\n\nCurrently present as a multiple choice question.\n\n**Question:** \"How has COVID-19 impacted you?\"\n\n**Options:** \n\n1. I go to work/school normally\n2. I am healthy but in a stay-at-home quarentine\n3. I have mild symptoms but haven't been tested\n4. I am diagnosed with COVID-19\n\n\nPresent in the second part of the feedback and, therefore, not required." + }, + "userId": { + "bsonType": "objectId", + "description": "Reference to the user's _id.\n\nThis will be present only if the user was logged in when completing the feedback." + }, + "location": { + "bsonType": "object", + "description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.", + "properties": { + "coordinates": { + "bsonType": "array", + "description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.", + "additionalItems": true, + "minItems": 2, + "maxItems": 2, + "uniqueItems": false, + "items": [ + { + "bsonType": "number", + "description": "Location longitude\n", + "minimum": -180, + "maximum": 180 + }, + { + "bsonType": "number", + "description": "Location latitude\n", + "minimum": -90, + "maximum": 90 + } + ] + }, + "type": { + "bsonType": "string", + "description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**", + "enum": [ + "Point" + ] + }, + "country": { + "bsonType": "string", + "description": "String holding the country's name.\n" + }, + "city": { + "bsonType": "string", + "description": "String holding the city's name." + }, + "neighborhood": { + "bsonType": "string", + "description": "String holding the neighborhood's name." + }, + "address": { + "bsonType": "string", + "description": "String holding the address (street, number and other details)." + } + }, + "additionalProperties": false, + "required": [ + "coordinates", + "type" + ] + } + }, + "required": [ + "createdAt", + "_id", + "updatedAt", + "rating", + "ipAddress" + ] + } + }, + "validationLevel": "off", + "validationAction": "warn" +}); \ No newline at end of file diff --git a/v3/scripts/MongoDB_Script/applicationDB/messages.js b/v3/scripts/MongoDB_Script/applicationDB/messages.js new file mode 100644 index 0000000..d3c37ad --- /dev/null +++ b/v3/scripts/MongoDB_Script/applicationDB/messages.js @@ -0,0 +1,172 @@ +use applicationDB; + +db.createCollection( "messages",{ + "storageEngine": { + "wiredTiger": {} + }, + "capped": false, + "validator": { + "$jsonSchema": { + "bsonType": "object", + "title": "messages", + "description": "Message sent in a private conversation\n", + "additionalProperties": false, + "properties": { + "_id": { + "bsonType": "objectId", + "description": "ObjectId used as primary key for a message" + }, + "createdAt": { + "bsonType": "date", + "description": "Timestamp with message's creation date" + }, + "updatedAt": { + "bsonType": "date", + "description": "Timestamp with message's update date" + }, + "authorId": { + "bsonType": "objectId", + "description": "ObjectId of the user who sent the message" + }, + "content": { + "bsonType": "string", + "description": "Messages content, containing html links and emojis " + }, + "threadId": { + "bsonType": "objectId", + "description": "Reference to the thread were the message was sent" + }, + "status": { + "bsonType": "string", + "description": "Curerent message status, used to define if it was edited or deleted:\n\n* **sent**: message was sent and not edited or deleted.\n* **edited**: message was edited by the author\n* **deleted**: message was deleted by the author", + "enum": [ + "edited", + "deleted", + "sent" + ] + }, + "postRef": { + "bsonType": "object", + "description": "Optional post reference, allowing a post to be referenced in a message thread.", + "properties": { + "id": { + "bsonType": "objectId" + }, + "objective": { + "bsonType": "string", + "description": "Field to indicate the post's objective.\nCurrently only two values allowed: \"offering help\" and \"looking for help\".", + "enum": [ + "request", + "offer" + ] + }, + "title": { + "bsonType": "string", + "description": "The post title." + }, + "content": { + "bsonType": "string", + "description": "String for the post content." + }, + "author": { + "bsonType": "object", + "properties": { + "id": { + "bsonType": "objectId", + "description": "Foreign key to the user who created the post." + }, + "name": { + "bsonType": "string" + }, + "type": { + "bsonType": "string" + }, + "location": { + "bsonType": "object", + "description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.", + "properties": { + "coordinates": { + "bsonType": "array", + "description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.", + "additionalItems": true, + "minItems": 2, + "maxItems": 2, + "uniqueItems": false, + "items": [ + { + "bsonType": "number", + "description": "Location longitude\n", + "minimum": -180, + "maximum": 180 + }, + { + "bsonType": "number", + "description": "Location latitude\n", + "minimum": -90, + "maximum": 90 + } + ] + }, + "type": { + "bsonType": "string", + "description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**", + "enum": [ + "Point" + ] + }, + "country": { + "bsonType": "string", + "description": "String holding the country's name.\n" + }, + "city": { + "bsonType": "string", + "description": "String holding the city's name." + }, + "neighborhood": { + "bsonType": "string", + "description": "String holding the neighborhood's name." + }, + "address": { + "bsonType": "string", + "description": "String holding the address (street, number and other details)." + } + }, + "additionalProperties": false, + "required": [ + "coordinates", + "type" + ] + } + }, + "additionalProperties": false, + "required": [ + "id", + "name", + "type" + ] + } + }, + "additionalProperties": false, + "required": [ + "id", + "objective", + "title", + "content", + "author" + ] + } + }, + "required": [ + "_id", + "createdAt", + "updatedAt", + "authorId", + "content", + "threadId", + "status" + ] + } + }, + "validationLevel": "off", + "validationAction": "warn" +}); \ No newline at end of file diff --git a/v3/scripts/MongoDB_Script/applicationDB/posts.js b/v3/scripts/MongoDB_Script/applicationDB/posts.js new file mode 100644 index 0000000..d6fe24a --- /dev/null +++ b/v3/scripts/MongoDB_Script/applicationDB/posts.js @@ -0,0 +1,211 @@ +use applicationDB; + +db.createCollection( "posts",{ + "storageEngine": { + "wiredTiger": {} + }, + "capped": false, + "validator": { + "$jsonSchema": { + "bsonType": "object", + "title": "posts", + "description": "Document to represent a post, asking or offering help to be displayed on the feed", + "additionalProperties": false, + "properties": { + "_id": { + "bsonType": "objectId" + }, + "createdAt": { + "bsonType": "date", + "description": "Timestamp with the post's creation date" + }, + "updatedAt": { + "bsonType": "date", + "description": "Timestamp with the post's last update date" + }, + "expireAt": { + "bsonType": "date", + "description": "Timestamp with the date the post will expire.\nIf no expiration date is present, the post does not expire." + }, + "author": { + "bsonType": "object", + "properties": { + "id": { + "bsonType": "objectId", + "description": "Foreign key to the user who created the post." + }, + "name": { + "bsonType": "string" + }, + "type": { + "bsonType": "string" + }, + "location": { + "bsonType": "object", + "description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.", + "properties": { + "coordinates": { + "bsonType": "array", + "description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.", + "additionalItems": true, + "minItems": 2, + "maxItems": 2, + "uniqueItems": false, + "items": [ + { + "bsonType": "number", + "description": "Location longitude\n", + "minimum": -180, + "maximum": 180 + }, + { + "bsonType": "number", + "description": "Location latitude\n", + "minimum": -90, + "maximum": 90 + } + ] + }, + "type": { + "bsonType": "string", + "description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**", + "enum": [ + "Point" + ] + }, + "country": { + "bsonType": "string", + "description": "String holding the country's name.\n" + }, + "city": { + "bsonType": "string", + "description": "String holding the city's name." + }, + "neighborhood": { + "bsonType": "string", + "description": "String holding the neighborhood's name." + }, + "address": { + "bsonType": "string", + "description": "String holding the address (street, number and other details)." + } + }, + "additionalProperties": false, + "required": [ + "coordinates", + "type" + ] + } + }, + "additionalProperties": false, + "required": [ + "id", + "name", + "type" + ] + }, + "title": { + "bsonType": "string", + "description": "The post title." + }, + "content": { + "bsonType": "string", + "description": "String for the post content." + }, + "objective": { + "bsonType": "string", + "description": "Field to indicate the post's objective.\nCurrently only two values allowed: \"offering help\" and \"looking for help\".", + "enum": [ + "request", + "offer" + ] + }, + "visibility": { + "bsonType": "string", + "description": "Field to specify the post's visibility. It can be: worldwide, country, state and zipcode.", + "enum": [ + "zipcode", + "state", + "country", + "worldwide" + ] + }, + "likes": { + "bsonType": "array", + "description": "Array holding the user_id of all the users who liked the post.", + "additionalItems": true, + "uniqueItems": true, + "items": { + "bsonType": "objectId", + "description": "_id of the user who liked the post" + } + }, + "types": { + "bsonType": "array", + "description": "Array with the post's tags.\nCan be: Medical Supplies, Groceries/Food, Business, Education, Legal, Wellbeing/Mental, Entertainment, Information, Funding, R&D and Others", + "additionalItems": true, + "uniqueItems": false, + "items": { + "bsonType": "string", + "enum": [ + "Medical Supplies", + "Groceries/Food", + "Business", + "Education", + "Legal", + "Wellbeing/Mental", + "Entertainment", + "Information", + "Funding", + "R&D", + "Others" + ] + } + }, + "language": { + "bsonType": "array", + "additionalItems": true, + "uniqueItems": false, + "items": { + "bsonType": "string" + } + }, + "externalLinks": { + "bsonType": "object", + "properties": { + "email": { + "bsonType": "string", + "description": "An email related to the post's content." + }, + "website": { + "bsonType": "string", + "description": "Link for a website related to the post's content." + }, + "playStore": { + "bsonType": "string", + "description": "Link for a Play Store application related to the post's content." + }, + "appStore": { + "bsonType": "string", + "description": "Link for a AppStore application related to the post's content." + } + }, + "additionalProperties": false + } + }, + "required": [ + "_id", + "createdAt", + "updatedAt", + "author", + "title", + "content", + "objective", + "visibility", + "likes" + ] + } + }, + "validationLevel": "off", + "validationAction": "warn" +}); \ No newline at end of file diff --git a/v3/scripts/MongoDB_Script/applicationDB/thread.js b/v3/scripts/MongoDB_Script/applicationDB/thread.js new file mode 100644 index 0000000..27cf261 --- /dev/null +++ b/v3/scripts/MongoDB_Script/applicationDB/thread.js @@ -0,0 +1,92 @@ +use applicationDB; + +db.createCollection( "thread",{ + "storageEngine": { + "wiredTiger": {} + }, + "capped": false, + "validator": { + "$jsonSchema": { + "bsonType": "object", + "title": "thread", + "description": "ObjectId that serves as primary key for the message thread.", + "additionalProperties": false, + "properties": { + "_id": { + "bsonType": "objectId" + }, + "createdAt": { + "bsonType": "date", + "description": "Timestamp with the threads's creation date" + }, + "updatedAt": { + "bsonType": "date", + "description": "Timestamp with the thread's update date" + }, + "status": { + "bsonType": "string", + "description": "Curerent thread status, used to define archives, soft deletes and other conversation status. The statuses are:\n\n* **pending**: if the user didn't accept the message request yet\n* **blocked**: if the one of the user's blocked the other\n* **accepted**: message request was accepted and users exchange messages\n* **archived**: user archived the message thread\n", + "enum": [ + "blocked", + "accepted", + "pending", + "archived" + ] + }, + "participants": { + "bsonType": "array", + "description": "Array of user reference's, containing the participants of the message thread.\n\nIt is modelled as an array to allow expansion to group chats in the future.", + "additionalItems": true, + "minItems": 2, + "uniqueItems": false, + "items": { + "bsonType": "object", + "properties": { + "id": { + "bsonType": "objectId", + "description": "Foreign key to the user who created the post." + }, + "name": { + "bsonType": "string", + "description": "User's name" + }, + "type": { + "bsonType": "string", + "description": "User's type" + }, + "newMessages": { + "bsonType": "bool", + "description": "Flag to indicate whether there are new messages since last time the user accessed the thread." + }, + "lastAccess": { + "bsonType": "date", + "description": "Timestamp with the last time the user accessed the message thread." + }, + "photo": { + "bsonType": "string", + "description": "URL with the user photo" + } + }, + "additionalProperties": false, + "required": [ + "id", + "name", + "type", + "newMessages", + "lastAccess" + ] + } + } + }, + "required": [ + "_id", + "createdAt", + "updatedAt", + "status", + "participants" + ] + } + }, + "validationLevel": "off", + "validationAction": "warn" +}); \ No newline at end of file diff --git a/v3/scripts/MongoDB_Script/applicationDB/users.js b/v3/scripts/MongoDB_Script/applicationDB/users.js new file mode 100644 index 0000000..5edc53c --- /dev/null +++ b/v3/scripts/MongoDB_Script/applicationDB/users.js @@ -0,0 +1,338 @@ +use applicationDB; + +db.createCollection( "users",{ + "storageEngine": { + "wiredTiger": {} + }, + "capped": false, + "validator": { + "$jsonSchema": { + "bsonType": "object", + "title": "users", + "description": "Collection that holds all the data on system's users. \n\nThe users can be of **two types**: **(1) Individual**, representing a private user account; and **(2) Organization**, representing an organization of various types.\n\nThe field 'type' is used to differentiate between the two subschemas, with 'individual' representing private user accounts and \"Community\", \"Government\", \"Health care provider\", \"Non-profit\", \"Other\", \"R&D\", \"Startup\", \"Traditional Company\" and \"University\".", + "additionalProperties": true, + "properties": { + "_id": { + "bsonType": "objectId", + "description": "Automatically generated _it as primary key." + }, + "createdAt": { + "bsonType": "date", + "description": "Timestamp with the user's creation date" + }, + "updatedAt": { + "bsonType": "date", + "description": "Timestamp indicating last update on the database." + }, + "authId": { + "bsonType": "string", + "description": "String holding the authentication service id (Auth0).\n\nThis field is a **foreign key to the user in the Auth0 database**, connecting through the user_id field." + }, + "location": { + "bsonType": "object", + "description": "Location document according to the norms of a [GeoJSON Object](https://docs.mongodb.com/manual/reference/geojson/ ).\nThe fields address, neighborhood, city, state and country are added to store the result of the geoprocessing.", + "properties": { + "coordinates": { + "bsonType": "array", + "description": "Array with the coordinates, specifying **longitude first** and **latitude second**, as default in the [GeoJSON](https://docs.mongodb.com/manual/reference/geojson/) definition.", + "additionalItems": true, + "minItems": 2, + "maxItems": 2, + "uniqueItems": false, + "items": [ + { + "bsonType": "number", + "description": "Location longitude\n", + "minimum": -180, + "maximum": 180 + }, + { + "bsonType": "number", + "description": "Location latitude\n", + "minimum": -90, + "maximum": 90 + } + ] + }, + "type": { + "bsonType": "string", + "description": "Type of the GeoJSON Object.\nPlease refer to the [official documentation](https://docs.mongodb.com/manual/reference/geojson/ ) for more information.\n\n**In our case, the value will always be of the type \"Point\".**", + "enum": [ + "Point" + ] + }, + "country": { + "bsonType": "string", + "description": "String holding the country's name.\n" + }, + "city": { + "bsonType": "string", + "description": "String holding the city's name." + }, + "neighborhood": { + "bsonType": "string", + "description": "String holding the neighborhood's name." + }, + "address": { + "bsonType": "string", + "description": "String holding the address (street, number and other details)." + } + }, + "additionalProperties": false, + "required": [ + "coordinates", + "type" + ] + }, + "about": { + "bsonType": "string", + "description": "Small self-introduction, limited to 100 char" + }, + "photo": { + "bsonType": "string", + "description": "URI with the location of the profile's photo." + } + }, + "oneOf": [ + { + "bsonType": "object", + "description": "Subschema representing a individual account.", + "properties": { + "type": { + "bsonType": "string", + "enum": [ + "individual" + ] + }, + "firstName": { + "bsonType": "string", + "description": "The first name of the user" + }, + "lastName": { + "bsonType": "string", + "description": "The last name of the user. Optional field." + }, + "needs": { + "bsonType": "object", + "description": "User's need in the app, representing what kind of help he/she needs", + "properties": { + "medicalHelp": { + "bsonType": "bool", + "description": "Flag to indicate wheter the user needs medical help. \nMarking this indicates he shows symptoms of COVID-19." + }, + "otherHelp": { + "bsonType": "bool", + "description": "Flag to indicate wheter the user needs non-medical help, such as getting groceries, medice and etc.." + } + }, + "additionalProperties": false, + "required": [ + "medicalHelp", + "otherHelp" + ] + }, + "objectives": { + "bsonType": "object", + "description": "Document with what are the objectives of the user through the application, such as donating, volunteering or sharing information.", + "properties": { + "volunteer": { + "bsonType": "bool", + "description": "Flag to indicate wheter the user wants to volunteer for iniciatives through the app." + }, + "donate": { + "bsonType": "bool", + "description": "Flag to indicate wheter the user wants to donate for iniciatives through the app." + }, + "shareInformation": { + "bsonType": "bool", + "description": "Flag to indicate wheter the user wants to share information through the app." + } + }, + "additionalProperties": false, + "required": [ + "volunteer", + "donate", + "shareInformation" + ] + }, + "urls": { + "bsonType": "object", + "description": "Document holding the user urls to external websites and social networks", + "properties": { + "facebook": { + "bsonType": "string", + "description": "URL to user's Facebook page." + }, + "linkedin": { + "bsonType": "string", + "description": "URL to user's Linkedin page." + }, + "twitter": { + "bsonType": "string", + "description": "URL to user's Twitter page." + }, + "github": { + "bsonType": "string", + "description": "URL to user's Github page." + }, + "website": { + "bsonType": "string", + "description": "URL to user's personal website." + } + }, + "additionalProperties": false + } + }, + "additionalProperties": true, + "required": [ + "type", + "firstName", + "needs" + ] + }, + { + "bsonType": "object", + "description": "Subschema representing an organization (colective) account.", + "properties": { + "type": { + "bsonType": "string", + "description": "The type of the organization. Can be: Community, Government, Health care provider, Non-profit, Other, R&D, Startup, Traditional Company and University. All names are store in lowercase only.", + "enum": [ + "startup", + "traditional company", + "community", + "government", + "r&d", + "non-profit", + "university", + "health care provider", + "other" + ] + }, + "industry": { + "bsonType": "string", + "description": "Industry from which the organization participates. Plan is for this values to be scraped from linkedin industries." + }, + "ownerId": { + "bsonType": "objectId", + "description": "_id of the user who owns the organization." + }, + "name": { + "bsonType": "string", + "description": "Organization's name.\n" + }, + "needs": { + "bsonType": "object", + "description": "Document with what are the objectives of the organization through the application, such as finding volunteers, staff, investors and donors.", + "properties": { + "volunteers": { + "bsonType": "bool", + "description": "Flag to indicate wheter the organization is seeking volunteers through the app." + }, + "donations": { + "bsonType": "bool", + "description": "Flag to indicate wheter the organization is seeking donations through the app." + }, + "staff": { + "bsonType": "bool", + "description": "Flag to indicate wheter the organization is seeking staff through the app." + }, + "other": { + "bsonType": "bool", + "description": "Flag to indicate wheter the organization is seeking other needs through the app." + } + }, + "additionalProperties": false, + "required": [ + "volunteers", + "donations", + "staff", + "other" + ] + }, + "global": { + "bsonType": "bool", + "description": "Flag to indicate wheter this organization is global." + }, + "urls": { + "bsonType": "object", + "description": "Document holding external urls and refs to the organization such as social media profiles.", + "properties": { + "linkedin": { + "bsonType": "string", + "description": "URL to organization's Linkedin page." + }, + "twitter": { + "bsonType": "string", + "description": "URL to organization's Twitter page." + }, + "website": { + "bsonType": "string", + "description": "URL to organization's website." + }, + "playstore": { + "bsonType": "string", + "description": "URL to organization's page at Google Play Store." + }, + "appstore": { + "bsonType": "string", + "description": "URL to organization's page at Apple App Store" + } + }, + "additionalProperties": false + }, + "language": { + "bsonType": "string", + "description": "Field to inidicate the language used by the organization." + } + }, + "additionalProperties": false, + "required": [ + "type", + "industry", + "ownerId", + "name", + "needs" + ] + } + ], + "anyOf": [ + { + "bsonType": "object", + "description": "Case where the user comes from social networks with a registration that uses email. In this case, the email field is required. This case covers the great majority of currently supported social network authentications.", + "properties": { + "email": { + "bsonType": "string", + "description": "User's email validated by a regex pattern." + } + }, + "additionalProperties": true, + "required": [ + "email" + ] + }, + { + "bsonType": "object", + "description": "Case where the user comes from social networks with a registration that allows the use of only the phone. In this case, the phone field is required, and the email isn't. \n\nAn example of ocial network that falls into this case is Twitter.", + "properties": { + "phone": { + "bsonType": "string" + } + }, + "additionalProperties": false, + "required": [ + "phone" + ] + } + ], + "required": [ + "createdAt", + "_id", + "updatedAt", + "authId" + ] + } + }, + "validationLevel": "off", + "validationAction": "warn" +}); \ No newline at end of file diff --git a/v3/scripts/Mongoose_Script/applicationDB/author.js b/v3/scripts/Mongoose_Script/applicationDB/author.js new file mode 100644 index 0000000..33769c8 --- /dev/null +++ b/v3/scripts/Mongoose_Script/applicationDB/author.js @@ -0,0 +1,12 @@ +var author = new Schema({ + id: { + type: Schema.Types.ObjectId + }, + name: { + type: String + }, + type: { + type: String + }, + location: location +}); \ No newline at end of file diff --git a/v3/scripts/Mongoose_Script/applicationDB/comments.js b/v3/scripts/Mongoose_Script/applicationDB/comments.js new file mode 100644 index 0000000..93885de --- /dev/null +++ b/v3/scripts/Mongoose_Script/applicationDB/comments.js @@ -0,0 +1,31 @@ +var comments = new Schema({ + _id: { + type: Schema.Types.ObjectId, + required: true + }, + createdAt: { + type: Date, + required: true + }, + updatedAt: { + type: Date, + required: true + }, + author: author, + postId: { + type: Schema.Types.ObjectId, + required: true + }, + parentId: { + type: Schema.Types.ObjectId + }, + content: { + type: String, + required: true + }, + likes: [ + { + type: Schema.Types.ObjectId + } + ] +}); \ No newline at end of file diff --git a/v3/scripts/Mongoose_Script/applicationDB/feedbacks.js b/v3/scripts/Mongoose_Script/applicationDB/feedbacks.js new file mode 100644 index 0000000..17cbaad --- /dev/null +++ b/v3/scripts/Mongoose_Script/applicationDB/feedbacks.js @@ -0,0 +1,44 @@ +var feedbacks = new Schema({ + createdAt: { + type: Date, + required: true + }, + _id: { + type: Schema.Types.ObjectId, + required: true + }, + updatedAt: { + type: Date, + required: true + }, + rating: { + type: Number, + min: 1, + max: 5, + required: true + }, + ipAddress: { + type: String, + required: true + }, + age: { + type: Number, + min: 18 + }, + mostValuableFeature: { + type: String + }, + whatWouldChange: { + type: String + }, + generalFeedback: { + type: String + }, + covidImpact: { + type: String + }, + userId: { + type: Schema.Types.ObjectId + }, + location: location +}); \ No newline at end of file diff --git a/v3/scripts/Mongoose_Script/applicationDB/location.js b/v3/scripts/Mongoose_Script/applicationDB/location.js new file mode 100644 index 0000000..87feb94 --- /dev/null +++ b/v3/scripts/Mongoose_Script/applicationDB/location.js @@ -0,0 +1,35 @@ +var location = new Schema({ + coordinates: [ + { + type: Number, + min: -180, + max: 180, + default: 0 + }, + { + type: Number, + min: -90, + max: 90, + default: 0 + } + ], + type: { + type: String, + enum: [ + "Point" + ], + required: true + }, + country: { + type: String + }, + city: { + type: String + }, + neighborhood: { + type: String + }, + address: { + type: String + } +}); \ No newline at end of file diff --git a/v3/scripts/Mongoose_Script/applicationDB/messages.js b/v3/scripts/Mongoose_Script/applicationDB/messages.js new file mode 100644 index 0000000..266e6f5 --- /dev/null +++ b/v3/scripts/Mongoose_Script/applicationDB/messages.js @@ -0,0 +1,37 @@ +var messages = new Schema({ + _id: { + type: Schema.Types.ObjectId, + required: true + }, + createdAt: { + type: Date, + required: true + }, + updatedAt: { + type: Date, + required: true + }, + authorId: { + type: Schema.Types.ObjectId, + required: true + }, + content: { + type: String, + required: true + }, + threadId: { + type: Schema.Types.ObjectId, + required: true + }, + status: { + type: String, + default: "sent", + enum: [ + "edited", + "deleted", + "sent" + ], + required: true + }, + postRef: postRef +}); \ No newline at end of file diff --git a/v3/scripts/Mongoose_Script/applicationDB/postRef.js b/v3/scripts/Mongoose_Script/applicationDB/postRef.js new file mode 100644 index 0000000..0a55ea0 --- /dev/null +++ b/v3/scripts/Mongoose_Script/applicationDB/postRef.js @@ -0,0 +1,23 @@ +var postRef = new Schema({ + id: { + type: Schema.Types.ObjectId, + required: true + }, + objective: { + type: String, + enum: [ + "request", + "offer" + ], + required: true + }, + title: { + type: String, + required: true + }, + content: { + type: String, + required: true + }, + author: author +}); \ No newline at end of file diff --git a/v3/scripts/Mongoose_Script/applicationDB/posts.js b/v3/scripts/Mongoose_Script/applicationDB/posts.js new file mode 100644 index 0000000..a6f1594 --- /dev/null +++ b/v3/scripts/Mongoose_Script/applicationDB/posts.js @@ -0,0 +1,86 @@ +var posts = new Schema({ + _id: { + type: Schema.Types.ObjectId, + required: true + }, + createdAt: { + type: Date, + required: true + }, + updatedAt: { + type: Date, + required: true + }, + expireAt: { + type: Date + }, + author: author, + title: { + type: String, + required: true + }, + content: { + type: String, + required: true + }, + objective: { + type: String, + enum: [ + "request", + "offer" + ], + required: true + }, + visibility: { + type: String, + enum: [ + "zipcode", + "state", + "country", + "worldwide" + ], + required: true + }, + likes: [ + { + type: Schema.Types.ObjectId + } + ], + types: [ + { + type: String, + enum: [ + "Medical Supplies", + "Groceries/Food", + "Business", + "Education", + "Legal", + "Wellbeing/Mental", + "Entertainment", + "Information", + "Funding", + "R&D", + "Others" + ] + } + ], + language: [ + { + type: String + } + ], + externalLinks: new Schema({ + email: { + type: String + }, + website: { + type: String + }, + playStore: { + type: String + }, + appStore: { + type: String + } + }) +}); \ No newline at end of file diff --git a/v3/scripts/Mongoose_Script/applicationDB/thread.js b/v3/scripts/Mongoose_Script/applicationDB/thread.js new file mode 100644 index 0000000..8e701a3 --- /dev/null +++ b/v3/scripts/Mongoose_Script/applicationDB/thread.js @@ -0,0 +1,53 @@ +var thread = new Schema({ + _id: { + type: Schema.Types.ObjectId, + required: true + }, + createdAt: { + type: Date, + required: true + }, + updatedAt: { + type: Date, + required: true + }, + status: { + type: String, + default: "pending", + enum: [ + "blocked", + "accepted", + "pending", + "archived" + ], + required: true + }, + participants: [ + new Schema({ + id: { + type: Schema.Types.ObjectId, + required: true + }, + name: { + type: String, + required: true + }, + type: { + type: String, + required: true + }, + newMessages: { + type: Boolean, + default: false, + required: true + }, + lastAccess: { + type: Date, + required: true + }, + photo: { + type: String + } + }) + ] +}); \ No newline at end of file diff --git a/v3/scripts/Mongoose_Script/applicationDB/users.js b/v3/scripts/Mongoose_Script/applicationDB/users.js new file mode 100644 index 0000000..c7ba923 --- /dev/null +++ b/v3/scripts/Mongoose_Script/applicationDB/users.js @@ -0,0 +1,25 @@ +var users = new Schema({ + createdAt: { + type: Date, + required: true + }, + _id: { + type: Schema.Types.ObjectId, + required: true + }, + updatedAt: { + type: Date, + required: true + }, + authId: { + type: String, + required: true + }, + location: location, + about: { + type: String + }, + photo: { + type: String + } +}); \ No newline at end of file