diff --git a/cms/src/api/novel-condensate/content-types/novel-condensate/schema.json b/cms/src/api/novel-condensate/content-types/novel-condensate/schema.json new file mode 100644 index 0000000000000000000000000000000000000000..1c696a5dcf070907ffb22345d86adf1d816a538d --- /dev/null +++ b/cms/src/api/novel-condensate/content-types/novel-condensate/schema.json @@ -0,0 +1,71 @@ +{ + "kind": "collectionType", + "collectionName": "novel_condensates", + "info": { + "singularName": "novel-condensate", + "pluralName": "novel-condensates", + "displayName": "NovelCondensate", + "description": "" + }, + "options": { + "draftAndPublish": false + }, + "pluginOptions": {}, + "attributes": { + "Name": { + "type": "string", + "required": true + }, + "IsExperimental": { + "type": "boolean", + "required": true + }, + "SpeciesTaxId": { + "type": "integer", + "required": true + }, + "Proteins": { + "type": "json", + "required": true + }, + "Synonyms": { + "type": "text" + }, + "Status": { + "type": "enumeration", + "enum": [ + "requested", + "accepted", + "rejected", + "synced" + ] + }, + "SubmissionComments": { + "type": "richtext" + }, + "submittedBy": { + "type": "relation", + "relation": "manyToOne", + "target": "plugin::users-permissions.user", + "inversedBy": "SubmittedNovelCondensates" + }, + "SubmittedAt": { + "type": "datetime" + }, + "reviewedBy": { + "type": "relation", + "relation": "oneToMany", + "target": "plugin::users-permissions.user", + "mappedBy": "ReviewedNovelCondensates" + }, + "ReviewedAt": { + "type": "datetime" + }, + "SyncResponse": { + "type": "string" + }, + "SyncedAt": { + "type": "datetime" + } + } +} diff --git a/cms/src/api/novel-condensate/controllers/novel-condensate.js b/cms/src/api/novel-condensate/controllers/novel-condensate.js new file mode 100644 index 0000000000000000000000000000000000000000..e94c9235207f6ade1a8ced100091656f5f64c197 --- /dev/null +++ b/cms/src/api/novel-condensate/controllers/novel-condensate.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * novel-condensate controller + */ + +const { createCoreController } = require('@strapi/strapi').factories; + +module.exports = createCoreController('api::novel-condensate.novel-condensate'); diff --git a/cms/src/api/novel-condensate/routes/novel-condensate.js b/cms/src/api/novel-condensate/routes/novel-condensate.js new file mode 100644 index 0000000000000000000000000000000000000000..cd5f7cabd72f866b91482b54542347051019fced --- /dev/null +++ b/cms/src/api/novel-condensate/routes/novel-condensate.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * novel-condensate router. + */ + +const { createCoreRouter } = require('@strapi/strapi').factories; + +module.exports = createCoreRouter('api::novel-condensate.novel-condensate'); diff --git a/cms/src/api/novel-condensate/services/novel-condensate.js b/cms/src/api/novel-condensate/services/novel-condensate.js new file mode 100644 index 0000000000000000000000000000000000000000..179b96ed23de5b14eda9db910a2ff94ca553fb10 --- /dev/null +++ b/cms/src/api/novel-condensate/services/novel-condensate.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * novel-condensate service. + */ + +const { createCoreService } = require('@strapi/strapi').factories; + +module.exports = createCoreService('api::novel-condensate.novel-condensate'); diff --git a/cms/src/extensions/users-permissions/content-types/user/schema.json b/cms/src/extensions/users-permissions/content-types/user/schema.json index 242981a8777fae75cd76c101f24c568460731f32..0cb4bcd8f787bb5db8fe5e6a4bd57b759140af25 100644 --- a/cms/src/extensions/users-permissions/content-types/user/schema.json +++ b/cms/src/extensions/users-permissions/content-types/user/schema.json @@ -99,6 +99,18 @@ }, "scientific_discipline": { "type": "json" + }, + "ReviewedNovelCondensates": { + "type": "relation", + "relation": "manyToOne", + "target": "api::novel-condensate.novel-condensate", + "inversedBy": "reviewedBy" + }, + "SubmittedNovelCondensates": { + "type": "relation", + "relation": "oneToMany", + "target": "api::novel-condensate.novel-condensate", + "mappedBy": "submittedBy" } } }