|
|
|
___GoSurvey___ makes extensive use of the [JSON(B)](https://www.postgresql.org/docs/current/datatype-json.html) field types to allow for arbitary surveys to be stored centrally while proividing the possibility for cross-correlations of differently structured surveys.
|
|
|
|
|
|
|
|
```plantuml
|
|
|
|
@startuml
|
|
|
|
entity Surveys {
|
|
|
|
SurveyID : uuid
|
|
|
|
[Timestamps]
|
|
|
|
--
|
|
|
|
Name : character varying(255)
|
|
|
|
}
|
|
|
|
entity Consents {
|
|
|
|
ConsentID : uuid
|
|
|
|
[Timestamps]
|
|
|
|
SurveyID : uuid <<FK>>
|
|
|
|
--
|
|
|
|
data : json NOT NULL,
|
|
|
|
consent : boolean NOT NULL,
|
|
|
|
privacy : boolean NOT NULL
|
|
|
|
}
|
|
|
|
entity Answers {
|
|
|
|
AnswerID : uuid
|
|
|
|
[Timestamps]
|
|
|
|
SurveyID : uuid <<FK>>
|
|
|
|
--
|
|
|
|
data : json NOT NULL,
|
|
|
|
consent : boolean NOT NULL,
|
|
|
|
privacy : boolean NOT NULL
|
|
|
|
}
|
|
|
|
entity Users {
|
|
|
|
UserID : uuid
|
|
|
|
[Timestamps]
|
|
|
|
--
|
|
|
|
role : smallint
|
|
|
|
}
|
|
|
|
entity Formulas {
|
|
|
|
FormulaID : uuid
|
|
|
|
[Timestamps]
|
|
|
|
--
|
|
|
|
name : character varying(255) <<Index>>
|
|
|
|
}
|
|
|
|
entity Suites {
|
|
|
|
SuiteID : uuid
|
|
|
|
[Timestamps]
|
|
|
|
SurveyID : uuid <<FK>>
|
|
|
|
--
|
|
|
|
name : character varying(255) <<Index>>
|
|
|
|
mappings : json
|
|
|
|
}
|
|
|
|
|
|
|
|
Surveys ||..|{ Consents
|
|
|
|
Surveys ||..|{ Answers
|
|
|
|
Surveys ||..|{ Suites
|
|
|
|
Suites ||..|{ Formulas
|
|
|
|
Users }|..|{ Surveys
|
|
|
|
|
|
|
|
@enduml
|
|
|
|
``` |
|
|
\ No newline at end of file |