# Preface:

- This data model is a WIP.
- This data model is based on current xpub-collabra and xpub-faraday models, and the discussion that was held in Athens by teams working on those projects.
- JATS was used as a vocabulary, wherever appropriate.
- JATS was used as a source of data types, wherever appropriate.
- All groups of users are modelled with Teams
- All models have non-semantic 'created' and 'updated' dates
- All dates are ISO-8601 strings, as PostgreSQL recommends this as date input and JATS allows it.


# Models

##  Journal (Collection)

|   | type  | JATS  | comment  |  
|---|---|---|---|
| id  | UUID  |   |   |
| journalTitle  | String  | `<journal-title>`  |   |
| manuscripts  | [UUID]  |   | Usefulness unclear  |
| meta | JournalMetadata | | 
|  └ meta.publisherName | String | `<publisher-name>` |
|  └ meta.issn | String | `<issn>` | |

##  Manuscript (Fragment)

|   | type  | JATS  | comment  |  
|---|---|---|---|
| id  | UUID  |   |   |
| journalId  | UUID  |   | Link to Journal  |
| versions  | [UUID]  |   | Link to Versions  |


## ManuscriptVersion


|   | type  | JATS  | comment  |  
|---|---|---|---|
| id  | UUID  |   |   |
| submissionDate  | String  |   | date  |
| status  | String  |   |   |
| reviewers  | [Reviewer]  |   | Link to the members of the reviewers team  |
| files  | [String]  | `<ext-link>` ?  | URLs  |
| recommendations  | [Recommendation]  |   |  Link the version's review's recommentations |
| decision  | Decision  |   |   |
| meta  | ManuscriptMetadata  |   |   |
|  └ meta.title | String | `<title>` |
|  └ meta.abstract | String | `<abstract>` | |
|  └ meta.contributors | [Contributor] | `<contrib>` |
|  &nbsp;&nbsp;└ contributor.stringName | String | `<string-name>` |
|  &nbsp;&nbsp;└ contributor.givenNames | String | `<given-names>` |
|  &nbsp;&nbsp;└ contributor.surname | String | `<surname>` |
|  &nbsp;&nbsp;└ contributor.aff | String | `<aff>` |
|  └ meta.authorNode | String | | |
|  └ meta.publicationDate | String | | date |


## Decision

|   | type  | JATS  | comment  |  
|---|---|---|---|
| status  | String  |   | e.g. 'accept'  |
| submissionDate  | String  |   | date  |
| content | String  |   |   |
| files | [String]  |   |   |
| userId | UUID  |   | Link to the editor's user  |


## Reviewer

|   | type  | JATS  | comment  |  
|---|---|---|---|
| invitationDate  | String  |   | date  |
| review  | UUID  |   | Link to Review  |
| accepted | Boolean  |   |   |
| responseDate | String  |   |  date |
| userId | UUID  |   |  |
| reminders | [String]  |   | dates |


## Review

|   | type  | JATS  | comment  |  
|---|---|---|---|
| id  | UUID  |   |   |
| versionId  | UUID  |   | Link to Version  |
| reviewerId | UUID  |   | Link to Reviewer |
| content | String  |   |  |
| files | [String] |   |  |
| recommendation | Recommendation  |   | |
|  └ recommendation.recommendation | String | | accept or revise, etc. |
|  └ recommendation.comment | Comment | | |
|  &nbsp;&nbsp;└ comment.content | String | | |
|  &nbsp;&nbsp;└ comment.public | String | | |
| submissionDate | String  |   | date |
 

# Removed

## Journal.owners
The owners relationship is non-core/non-semantic and can be modelled with Teams if needed. As such, it will be deprecated/removed.

## Manuscript.originalSubmissionDate
Original submission date is the first versions's submission date, and isn't needed on the container model.

## ManuscriptVersion.meta.contributors.middleName
JATS recommends using <given-names> elements instead