# Preface: - This is a view model created through discussion in the PubSweet meeting in July 2018. - These models do not use Collections and Fragments, instead they are standalone models in separate tables. - JATS is used as a vocabulary and a source of data types, wherever appropriate. - All models have 'created' and 'updated' dates - All models have an 'id' UUID - Dates are ISO-8601 strings, as PostgreSQL recommends this as date input, JATS allows it, and GraphQL can handle it. # Models ## Organization | | type | JATS | comment | |---|---|---|---| | id | UUID | | | | created | Date | | | | updated | Date | | | | name | String | | | | journals | [Journals] | | | ## Journal | | type | JATS | comment | |---|---|---|---| | id | UUID | | | | created | Date | | | | updated | Date | | | | journalTitle | String | `<journal-title>` | | | manuscripts | [Manuscript] | | | | meta | JournalMetadata | | | └ meta.publisherName | String | `<publisher-name>` | ## AuditLog | | type | JATS | comment | |---|---|---|---| | id | UUID | | | | created | Date | | | | updated | Date | | | | userId | | | | | action | String | | | | objectId | | | | | objectType | | | | | meta | | | | ## Team All groups of people should be grouped in Teams. Teams are given permissions to an object. Permissions are based on the role. | | type | JATS | comment | |---|---|---|---| | id | UUID | | | | created | Date | | | | updated | Date | | | | members | [User] | | | | └ user.id | ID | | | | └ user.status | String | | | | └ user.alias | Object | | | | role | String | | e.g. 'reviewers', 'editors' | | objectId | | | | | objectType | | | | ### Roles #### Default `'submitter'`, `'author'`, `'reviewer'`, `'admin'` #### Specialized examples `'deputyEditor'`, `'handlingEditor'`, `'seniorEditor'`, `'suggestedReviewer'`, `'opposedReviewer'` ## User | | type | JATS | comment | |---|---|---|---| | id | UUID | | | | created | Date | | | | updated | Date | | | | identities | | | | | └ local | | | local identity (not from ORCID, etc.)| | └ local.email | String | | | | └ local.password | Hash | | | | └ local.name | String or Object| | | | └ local.[] | | | Profile extensions | | └ [] | | | other identities| | defaultIdentity | | | Ex. 'local' | ## Manuscript | | type | JATS | comment | |---|---|---|---| | id | UUID | | | | created | Date | | | | updated | Date | | | | manuscriptVersions | [ManuscriptVersion] | | | | files | [Files] | `<graphic>`, `<media>`,`<supplementary-material>` | | | teams | [Teams] | | | | reviews | [Review] | | | | status | String | | e.g. `initial` or `QA` | | formState | String | | e.g. `initial` or `QA` | | decision | String | | | | meta | ManuscriptMetadata | | | | └ meta.articleType | String | `@article-type` | | | └ meta.notes | [Note] | `<notes>` | | | └ note.notesType | String | `@notes-type` | | | └ note.content | String | | | | └ meta.articleIds | [Article IDs] | `<article-id>` | | | └ articleId.pubIdType | String | `@pub-id-type` | doi, pmid, etc. | | └ articleId.id | String | | | | └ meta.title | String | `<title>` | | | └ meta.abstract | String | `<abstract>` | | | └ meta.subjects | [Subjects] | `<subject>` | | | └meta.history | [History Dates] | `<history><date>`| | | └ history.type | String | `@date-type`| epub, ppub, etc. | | └ history.date | Date | `@iso-8601-date` | epub, ppub, etc. | | └meta.publicationDate | [Publication Dates] | `<pub-date>`| | | └ publicationDate.type | String | `@pub-type`| epub, ppub, etc. | | └ publicationDate.date | Date | `@iso-8601-date`| date | ## ManuscriptVersion Manuscript version is a snapshot copy of a manuscript, whenever the manuscript is changed in such a way that a new version should be created and the previous recorded as history. ## File | | type | JATS | comment | |---|---|---|---| | id | UUID | | | | created | Date | | | | updated | Date | | | | type | String | `<fig>`, `<supplementary-material>`, `<table-wrap>` | e.g. 'figure', 'supplementary', 'table' | | label | String | `<label>` | e.g. 'F1', 'Fig 1', 'S1' | | filename | String | `<media>`, `<graphic>` | | | url | String | `@xlink:href` | | | mimeType | String | `@mime-type`, `@mime-subtype` | e.g. 'image/jpeg', 'application/zip' | | size | Number | | | ## Review | | type | JATS | comment | |---|---|---|---| | id | UUID | | | | created | Date | | | | updated | Date | | | | comments | [Comment] | | | | └ comment.type | String | | | | └ comment.content | String | | | | └ files | [File] | | | | recommendation | String| | | | open | Boolean | | | | user | | | |