From ae1f6d1a00ee6dd2f1228ae065ee7a83091945d2 Mon Sep 17 00:00:00 2001 From: DrMint Date: Sun, 6 Feb 2022 18:37:15 +0100 Subject: [PATCH] Refacto of how the content is structured --- .../content-types/audio-set/schema.json | 34 -------- src/api/audio-set/controllers/audio-set.js | 9 --- src/api/audio-set/routes/audio-set.js | 9 --- src/api/audio-set/services/audio-set.js | 9 --- .../content/content-types/content/schema.json | 50 ++++++++++++ .../controllers/content.js} | 4 +- .../scan-set.js => content/routes/content.js} | 4 +- .../services/content.js} | 4 +- .../content-types/library-content/schema.json | 80 ------------------- .../controllers/library-content.js | 9 --- .../library-content/routes/library-content.js | 9 --- .../services/library-content.js | 9 --- .../content-types/library-item/schema.json | 24 +++--- .../content-types/ranged-content/schema.json | 50 ++++++++++++ .../controllers/ranged-content.js | 9 +++ .../ranged-content/routes/ranged-content.js | 9 +++ .../ranged-content/services/ranged-content.js | 9 +++ .../content-types/scan-set/schema.json | 34 -------- src/api/scan-set/services/scan-set.js | 9 --- .../source/content-types/source/schema.json | 15 ++-- .../content-types/text-set/schema.json | 34 -------- src/api/text-set/controllers/text-set.js | 9 --- src/api/text-set/routes/text-set.js | 9 --- .../content-types/video-set/schema.json | 34 -------- src/api/video-set/controllers/video-set.js | 9 --- src/api/video-set/routes/video-set.js | 9 --- src/api/video-set/services/video-set.js | 9 --- .../collections-component/library-cover.json | 45 +++++++++++ .../library-dust-jacket.json | 63 +++++++++++++++ .../collections-component/library-images.json | 28 +++++++ .../library-obi-belt.json | 45 +++++++++++ src/components/sets/scan-set.json | 58 ++++++++++++++ src/components/sets/text-set.json | 53 ++++++++++++ src/components/source/library-text.json | 8 +- src/components/translations/title.json | 19 +++++ 35 files changed, 465 insertions(+), 356 deletions(-) delete mode 100644 src/api/audio-set/content-types/audio-set/schema.json delete mode 100644 src/api/audio-set/controllers/audio-set.js delete mode 100644 src/api/audio-set/routes/audio-set.js delete mode 100644 src/api/audio-set/services/audio-set.js create mode 100644 src/api/content/content-types/content/schema.json rename src/api/{scan-set/controllers/scan-set.js => content/controllers/content.js} (51%) rename src/api/{scan-set/routes/scan-set.js => content/routes/content.js} (52%) rename src/api/{text-set/services/text-set.js => content/services/content.js} (52%) delete mode 100644 src/api/library-content/content-types/library-content/schema.json delete mode 100644 src/api/library-content/controllers/library-content.js delete mode 100644 src/api/library-content/routes/library-content.js delete mode 100644 src/api/library-content/services/library-content.js create mode 100644 src/api/ranged-content/content-types/ranged-content/schema.json create mode 100644 src/api/ranged-content/controllers/ranged-content.js create mode 100644 src/api/ranged-content/routes/ranged-content.js create mode 100644 src/api/ranged-content/services/ranged-content.js delete mode 100644 src/api/scan-set/content-types/scan-set/schema.json delete mode 100644 src/api/scan-set/services/scan-set.js delete mode 100644 src/api/text-set/content-types/text-set/schema.json delete mode 100644 src/api/text-set/controllers/text-set.js delete mode 100644 src/api/text-set/routes/text-set.js delete mode 100644 src/api/video-set/content-types/video-set/schema.json delete mode 100644 src/api/video-set/controllers/video-set.js delete mode 100644 src/api/video-set/routes/video-set.js delete mode 100644 src/api/video-set/services/video-set.js create mode 100644 src/components/collections-component/library-cover.json create mode 100644 src/components/collections-component/library-dust-jacket.json create mode 100644 src/components/collections-component/library-images.json create mode 100644 src/components/collections-component/library-obi-belt.json create mode 100644 src/components/sets/scan-set.json create mode 100644 src/components/sets/text-set.json create mode 100644 src/components/translations/title.json diff --git a/src/api/audio-set/content-types/audio-set/schema.json b/src/api/audio-set/content-types/audio-set/schema.json deleted file mode 100644 index 692ca09..0000000 --- a/src/api/audio-set/content-types/audio-set/schema.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "kind": "collectionType", - "collectionName": "audio_sets", - "info": { - "singularName": "audio-set", - "pluralName": "audio-sets", - "displayName": "🟡 Audio Sets", - "description": "" - }, - "options": { - "draftAndPublish": false - }, - "pluginOptions": {}, - "attributes": { - "slug": { - "type": "string", - "required": true, - "unique": true, - "regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$" - }, - "translations": { - "displayName": "Audio Sets", - "type": "component", - "repeatable": true, - "component": "translations.audio-sets" - }, - "library_contents": { - "type": "relation", - "relation": "oneToMany", - "target": "api::library-content.library-content", - "mappedBy": "audio_set" - } - } -} diff --git a/src/api/audio-set/controllers/audio-set.js b/src/api/audio-set/controllers/audio-set.js deleted file mode 100644 index 7c11c52..0000000 --- a/src/api/audio-set/controllers/audio-set.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -/** - * audio-set controller - */ - -const { createCoreController } = require('@strapi/strapi').factories; - -module.exports = createCoreController('api::audio-set.audio-set'); diff --git a/src/api/audio-set/routes/audio-set.js b/src/api/audio-set/routes/audio-set.js deleted file mode 100644 index 5f05085..0000000 --- a/src/api/audio-set/routes/audio-set.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -/** - * audio-set router. - */ - -const { createCoreRouter } = require('@strapi/strapi').factories; - -module.exports = createCoreRouter('api::audio-set.audio-set'); diff --git a/src/api/audio-set/services/audio-set.js b/src/api/audio-set/services/audio-set.js deleted file mode 100644 index d36cd98..0000000 --- a/src/api/audio-set/services/audio-set.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -/** - * audio-set service. - */ - -const { createCoreService } = require('@strapi/strapi').factories; - -module.exports = createCoreService('api::audio-set.audio-set'); diff --git a/src/api/content/content-types/content/schema.json b/src/api/content/content-types/content/schema.json new file mode 100644 index 0000000..4715b69 --- /dev/null +++ b/src/api/content/content-types/content/schema.json @@ -0,0 +1,50 @@ +{ + "kind": "collectionType", + "collectionName": "contents", + "info": { + "singularName": "content", + "pluralName": "contents", + "displayName": "🟡 Contents", + "description": "" + }, + "options": { + "draftAndPublish": false + }, + "pluginOptions": {}, + "attributes": { + "slug": { + "type": "string", + "unique": true, + "required": true, + "regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$" + }, + "categories": { + "type": "relation", + "relation": "oneToMany", + "target": "api::category.category" + }, + "type": { + "type": "relation", + "relation": "oneToOne", + "target": "api::content-type.content-type" + }, + "titles": { + "displayName": "title", + "type": "component", + "repeatable": true, + "component": "translations.title" + }, + "ranged_contents": { + "type": "relation", + "relation": "oneToMany", + "target": "api::ranged-content.ranged-content", + "mappedBy": "content" + }, + "text_set": { + "displayName": "text_set", + "type": "component", + "repeatable": true, + "component": "sets.text-set" + } + } +} diff --git a/src/api/scan-set/controllers/scan-set.js b/src/api/content/controllers/content.js similarity index 51% rename from src/api/scan-set/controllers/scan-set.js rename to src/api/content/controllers/content.js index af576cc..36c5f15 100644 --- a/src/api/scan-set/controllers/scan-set.js +++ b/src/api/content/controllers/content.js @@ -1,9 +1,9 @@ 'use strict'; /** - * scan-set controller + * content controller */ const { createCoreController } = require('@strapi/strapi').factories; -module.exports = createCoreController('api::scan-set.scan-set'); +module.exports = createCoreController('api::content.content'); diff --git a/src/api/scan-set/routes/scan-set.js b/src/api/content/routes/content.js similarity index 52% rename from src/api/scan-set/routes/scan-set.js rename to src/api/content/routes/content.js index 665802f..4e457ef 100644 --- a/src/api/scan-set/routes/scan-set.js +++ b/src/api/content/routes/content.js @@ -1,9 +1,9 @@ 'use strict'; /** - * scan-set router. + * content router. */ const { createCoreRouter } = require('@strapi/strapi').factories; -module.exports = createCoreRouter('api::scan-set.scan-set'); +module.exports = createCoreRouter('api::content.content'); diff --git a/src/api/text-set/services/text-set.js b/src/api/content/services/content.js similarity index 52% rename from src/api/text-set/services/text-set.js rename to src/api/content/services/content.js index 6f1aca8..8003268 100644 --- a/src/api/text-set/services/text-set.js +++ b/src/api/content/services/content.js @@ -1,9 +1,9 @@ 'use strict'; /** - * text-set service. + * content service. */ const { createCoreService } = require('@strapi/strapi').factories; -module.exports = createCoreService('api::text-set.text-set'); +module.exports = createCoreService('api::content.content'); diff --git a/src/api/library-content/content-types/library-content/schema.json b/src/api/library-content/content-types/library-content/schema.json deleted file mode 100644 index 55f001f..0000000 --- a/src/api/library-content/content-types/library-content/schema.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "kind": "collectionType", - "collectionName": "library_contents", - "info": { - "singularName": "library-content", - "pluralName": "library-contents", - "displayName": "🟠 Library Contents", - "description": "" - }, - "options": { - "draftAndPublish": false - }, - "pluginOptions": {}, - "attributes": { - "slug": { - "type": "string", - "regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$", - "required": true, - "unique": true - }, - "title": { - "displayName": "Library Content", - "type": "component", - "repeatable": true, - "component": "translations.library-content" - }, - "library_item": { - "type": "relation", - "relation": "manyToOne", - "target": "api::library-item.library-item", - "inversedBy": "contents" - }, - "scan_set": { - "type": "relation", - "relation": "oneToOne", - "target": "api::scan-set.scan-set", - "inversedBy": "library_content" - }, - "text_set": { - "type": "relation", - "relation": "manyToOne", - "target": "api::text-set.text-set", - "inversedBy": "library_contents" - }, - "range": { - "type": "dynamiczone", - "components": [ - "range.page-range", - "range.time-range", - "range.game-aspect", - "range.other" - ], - "required": true, - "max": 1, - "min": 1 - }, - "audio_set": { - "type": "relation", - "relation": "manyToOne", - "target": "api::audio-set.audio-set", - "inversedBy": "library_contents" - }, - "video_set": { - "type": "relation", - "relation": "manyToOne", - "target": "api::video-set.video-set", - "inversedBy": "library_contents" - }, - "type": { - "type": "relation", - "relation": "oneToOne", - "target": "api::content-type.content-type" - }, - "categories": { - "type": "relation", - "relation": "oneToMany", - "target": "api::category.category" - } - } -} diff --git a/src/api/library-content/controllers/library-content.js b/src/api/library-content/controllers/library-content.js deleted file mode 100644 index d3be1cb..0000000 --- a/src/api/library-content/controllers/library-content.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -/** - * library-content controller - */ - -const { createCoreController } = require('@strapi/strapi').factories; - -module.exports = createCoreController('api::library-content.library-content'); diff --git a/src/api/library-content/routes/library-content.js b/src/api/library-content/routes/library-content.js deleted file mode 100644 index d7cf5bb..0000000 --- a/src/api/library-content/routes/library-content.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -/** - * library-content router. - */ - -const { createCoreRouter } = require('@strapi/strapi').factories; - -module.exports = createCoreRouter('api::library-content.library-content'); diff --git a/src/api/library-content/services/library-content.js b/src/api/library-content/services/library-content.js deleted file mode 100644 index 2656d73..0000000 --- a/src/api/library-content/services/library-content.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -/** - * library-content service. - */ - -const { createCoreService } = require('@strapi/strapi').factories; - -module.exports = createCoreService('api::library-content.library-content'); diff --git a/src/api/library-item/content-types/library-item/schema.json b/src/api/library-item/content-types/library-item/schema.json index fbf589c..7db60f0 100644 --- a/src/api/library-item/content-types/library-item/schema.json +++ b/src/api/library-item/content-types/library-item/schema.json @@ -84,12 +84,6 @@ "pluginOptions": {}, "component": "basics.size" }, - "contents": { - "type": "relation", - "relation": "oneToMany", - "target": "api::library-content.library-content", - "mappedBy": "library_item" - }, "release_date": { "type": "component", "repeatable": false, @@ -103,12 +97,24 @@ "component": "translations.library-items" }, "gallery": { + "type": "media", + "multiple": true, + "required": false, "allowedTypes": [ "images", "videos" - ], - "type": "media", - "multiple": true + ] + }, + "contents": { + "type": "relation", + "relation": "oneToMany", + "target": "api::ranged-content.ranged-content", + "mappedBy": "library_item" + }, + "images": { + "type": "component", + "repeatable": false, + "component": "collections-component.library-images" } } } diff --git a/src/api/ranged-content/content-types/ranged-content/schema.json b/src/api/ranged-content/content-types/ranged-content/schema.json new file mode 100644 index 0000000..dceb20d --- /dev/null +++ b/src/api/ranged-content/content-types/ranged-content/schema.json @@ -0,0 +1,50 @@ +{ + "kind": "collectionType", + "collectionName": "ranged_contents", + "info": { + "singularName": "ranged-content", + "pluralName": "ranged-contents", + "displayName": "🟠 Ranged Contents", + "description": "" + }, + "options": { + "draftAndPublish": false + }, + "pluginOptions": {}, + "attributes": { + "slug": { + "type": "string", + "unique": true, + "required": true, + "regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$" + }, + "range": { + "type": "dynamiczone", + "components": [ + "range.page-range", + "range.time-range", + "range.other" + ], + "max": 1, + "min": 1 + }, + "scan_set": { + "displayName": "scan_set", + "type": "component", + "repeatable": true, + "component": "sets.scan-set" + }, + "library_item": { + "type": "relation", + "relation": "manyToOne", + "target": "api::library-item.library-item", + "inversedBy": "contents" + }, + "content": { + "type": "relation", + "relation": "manyToOne", + "target": "api::content.content", + "inversedBy": "ranged_contents" + } + } +} diff --git a/src/api/ranged-content/controllers/ranged-content.js b/src/api/ranged-content/controllers/ranged-content.js new file mode 100644 index 0000000..fbf7e3b --- /dev/null +++ b/src/api/ranged-content/controllers/ranged-content.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * ranged-content controller + */ + +const { createCoreController } = require('@strapi/strapi').factories; + +module.exports = createCoreController('api::ranged-content.ranged-content'); diff --git a/src/api/ranged-content/routes/ranged-content.js b/src/api/ranged-content/routes/ranged-content.js new file mode 100644 index 0000000..de58d61 --- /dev/null +++ b/src/api/ranged-content/routes/ranged-content.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * ranged-content router. + */ + +const { createCoreRouter } = require('@strapi/strapi').factories; + +module.exports = createCoreRouter('api::ranged-content.ranged-content'); diff --git a/src/api/ranged-content/services/ranged-content.js b/src/api/ranged-content/services/ranged-content.js new file mode 100644 index 0000000..76b1eae --- /dev/null +++ b/src/api/ranged-content/services/ranged-content.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * ranged-content service. + */ + +const { createCoreService } = require('@strapi/strapi').factories; + +module.exports = createCoreService('api::ranged-content.ranged-content'); diff --git a/src/api/scan-set/content-types/scan-set/schema.json b/src/api/scan-set/content-types/scan-set/schema.json deleted file mode 100644 index e03811b..0000000 --- a/src/api/scan-set/content-types/scan-set/schema.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "kind": "collectionType", - "collectionName": "scan_sets", - "info": { - "singularName": "scan-set", - "pluralName": "scan-sets", - "displayName": "🟡 Scan Sets", - "description": "" - }, - "options": { - "draftAndPublish": false - }, - "pluginOptions": {}, - "attributes": { - "slug": { - "type": "string", - "regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$", - "unique": true, - "required": true - }, - "translations": { - "displayName": "Scan Set", - "type": "component", - "repeatable": true, - "component": "translations.scan-set" - }, - "library_content": { - "type": "relation", - "relation": "oneToOne", - "target": "api::library-content.library-content", - "mappedBy": "scan_set" - } - } -} diff --git a/src/api/scan-set/services/scan-set.js b/src/api/scan-set/services/scan-set.js deleted file mode 100644 index 1821f3f..0000000 --- a/src/api/scan-set/services/scan-set.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -/** - * scan-set service. - */ - -const { createCoreService } = require('@strapi/strapi').factories; - -module.exports = createCoreService('api::scan-set.scan-set'); diff --git a/src/api/source/content-types/source/schema.json b/src/api/source/content-types/source/schema.json index 588ab76..eabb5a4 100644 --- a/src/api/source/content-types/source/schema.json +++ b/src/api/source/content-types/source/schema.json @@ -12,20 +12,15 @@ }, "pluginOptions": {}, "attributes": { - "source": { - "type": "dynamiczone", - "components": [ - "source.url-source", - "source.library-text" - ], - "max": 1, - "min": 1, - "required": true - }, "name": { "type": "string", "required": true, "unique": true + }, + "content": { + "type": "relation", + "relation": "oneToOne", + "target": "api::content.content" } } } diff --git a/src/api/text-set/content-types/text-set/schema.json b/src/api/text-set/content-types/text-set/schema.json deleted file mode 100644 index 08ab59e..0000000 --- a/src/api/text-set/content-types/text-set/schema.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "kind": "collectionType", - "collectionName": "text_sets", - "info": { - "singularName": "text-set", - "pluralName": "text-sets", - "displayName": "🟡 Text Sets", - "description": "" - }, - "options": { - "draftAndPublish": false - }, - "pluginOptions": {}, - "attributes": { - "slug": { - "type": "string", - "regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$", - "unique": true, - "required": true - }, - "translations": { - "displayName": "Text Set", - "type": "component", - "repeatable": true, - "component": "translations.text-set" - }, - "library_contents": { - "type": "relation", - "relation": "oneToMany", - "target": "api::library-content.library-content", - "mappedBy": "text_set" - } - } -} diff --git a/src/api/text-set/controllers/text-set.js b/src/api/text-set/controllers/text-set.js deleted file mode 100644 index 587d419..0000000 --- a/src/api/text-set/controllers/text-set.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -/** - * text-set controller - */ - -const { createCoreController } = require('@strapi/strapi').factories; - -module.exports = createCoreController('api::text-set.text-set'); diff --git a/src/api/text-set/routes/text-set.js b/src/api/text-set/routes/text-set.js deleted file mode 100644 index 7749d39..0000000 --- a/src/api/text-set/routes/text-set.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -/** - * text-set router. - */ - -const { createCoreRouter } = require('@strapi/strapi').factories; - -module.exports = createCoreRouter('api::text-set.text-set'); diff --git a/src/api/video-set/content-types/video-set/schema.json b/src/api/video-set/content-types/video-set/schema.json deleted file mode 100644 index f515c23..0000000 --- a/src/api/video-set/content-types/video-set/schema.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "kind": "collectionType", - "collectionName": "video_sets", - "info": { - "singularName": "video-set", - "pluralName": "video-sets", - "displayName": "🟡 Video Sets", - "description": "" - }, - "options": { - "draftAndPublish": false - }, - "pluginOptions": {}, - "attributes": { - "slug": { - "type": "string", - "unique": true, - "required": true, - "regex": "^[a-z0-9]+(?:-[a-z0-9]+)*$" - }, - "translations": { - "displayName": "Video Sets", - "type": "component", - "repeatable": true, - "component": "translations.video-sets" - }, - "library_contents": { - "type": "relation", - "relation": "oneToMany", - "target": "api::library-content.library-content", - "mappedBy": "video_set" - } - } -} diff --git a/src/api/video-set/controllers/video-set.js b/src/api/video-set/controllers/video-set.js deleted file mode 100644 index 88e45ac..0000000 --- a/src/api/video-set/controllers/video-set.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -/** - * video-set controller - */ - -const { createCoreController } = require('@strapi/strapi').factories; - -module.exports = createCoreController('api::video-set.video-set'); diff --git a/src/api/video-set/routes/video-set.js b/src/api/video-set/routes/video-set.js deleted file mode 100644 index 435a7cf..0000000 --- a/src/api/video-set/routes/video-set.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -/** - * video-set router. - */ - -const { createCoreRouter } = require('@strapi/strapi').factories; - -module.exports = createCoreRouter('api::video-set.video-set'); diff --git a/src/api/video-set/services/video-set.js b/src/api/video-set/services/video-set.js deleted file mode 100644 index d0e72e0..0000000 --- a/src/api/video-set/services/video-set.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -/** - * video-set service. - */ - -const { createCoreService } = require('@strapi/strapi').factories; - -module.exports = createCoreService('api::video-set.video-set'); diff --git a/src/components/collections-component/library-cover.json b/src/components/collections-component/library-cover.json new file mode 100644 index 0000000..860905e --- /dev/null +++ b/src/components/collections-component/library-cover.json @@ -0,0 +1,45 @@ +{ + "collectionName": "components_collections_component_library_covers", + "info": { + "displayName": "Library Cover", + "icon": "address-book" + }, + "options": {}, + "attributes": { + "front": { + "allowedTypes": [ + "images" + ], + "type": "media", + "multiple": false + }, + "spine": { + "allowedTypes": [ + "images" + ], + "type": "media", + "multiple": false + }, + "back": { + "allowedTypes": [ + "images" + ], + "type": "media", + "multiple": false + }, + "full": { + "allowedTypes": [ + "images" + ], + "type": "media", + "multiple": false + }, + "inside_full": { + "allowedTypes": [ + "images" + ], + "type": "media", + "multiple": false + } + } +} diff --git a/src/components/collections-component/library-dust-jacket.json b/src/components/collections-component/library-dust-jacket.json new file mode 100644 index 0000000..a55fc77 --- /dev/null +++ b/src/components/collections-component/library-dust-jacket.json @@ -0,0 +1,63 @@ +{ + "collectionName": "components_collections_component_library_dust_jackets", + "info": { + "displayName": "Library Dust Jacket", + "icon": "caret-square-up", + "description": "" + }, + "options": {}, + "attributes": { + "front": { + "type": "media", + "multiple": false, + "required": false, + "allowedTypes": [ + "images" + ] + }, + "spine": { + "type": "media", + "multiple": false, + "required": false, + "allowedTypes": [ + "images" + ] + }, + "back": { + "type": "media", + "multiple": false, + "required": false, + "allowedTypes": [ + "images" + ] + }, + "full": { + "allowedTypes": [ + "images" + ], + "type": "media", + "multiple": false + }, + "flap_front": { + "allowedTypes": [ + "images" + ], + "type": "media", + "multiple": false + }, + "flap_back": { + "allowedTypes": [ + "images" + ], + "type": "media", + "multiple": false + }, + "inside_full": { + "allowedTypes": [ + "images" + ], + "type": "media", + "multiple": false + } + } +} diff --git a/src/components/collections-component/library-images.json b/src/components/collections-component/library-images.json new file mode 100644 index 0000000..0c3f0ec --- /dev/null +++ b/src/components/collections-component/library-images.json @@ -0,0 +1,28 @@ +{ + "collectionName": "components_collections_component_library_images", + "info": { + "displayName": "Library Images", + "icon": "image", + "description": "" + }, + "options": {}, + "attributes": { + "cover": { + "displayName": "Library Cover", + "type": "component", + "repeatable": false, + "component": "collections-component.library-cover" + }, + "dust_jacket": { + "type": "component", + "repeatable": false, + "component": "collections-component.library-dust-jacket" + }, + "obi_belt": { + "displayName": "Library Obi Belt", + "type": "component", + "repeatable": false, + "component": "collections-component.library-obi-belt" + } + } +} diff --git a/src/components/collections-component/library-obi-belt.json b/src/components/collections-component/library-obi-belt.json new file mode 100644 index 0000000..e2c545a --- /dev/null +++ b/src/components/collections-component/library-obi-belt.json @@ -0,0 +1,45 @@ +{ + "collectionName": "components_collections_component_library_obi_belts", + "info": { + "displayName": "Library Obi Belt", + "icon": "circle-notch" + }, + "options": {}, + "attributes": { + "front": { + "allowedTypes": [ + "images" + ], + "type": "media", + "multiple": false + }, + "spine": { + "allowedTypes": [ + "images" + ], + "type": "media", + "multiple": false + }, + "back": { + "allowedTypes": [ + "images" + ], + "type": "media", + "multiple": false + }, + "full": { + "allowedTypes": [ + "images" + ], + "type": "media", + "multiple": false + }, + "inside_full": { + "allowedTypes": [ + "images" + ], + "type": "media", + "multiple": false + } + } +} diff --git a/src/components/sets/scan-set.json b/src/components/sets/scan-set.json new file mode 100644 index 0000000..8f1472b --- /dev/null +++ b/src/components/sets/scan-set.json @@ -0,0 +1,58 @@ +{ + "collectionName": "components_sets_scan_sets", + "info": { + "displayName": "scan_set", + "icon": "file-contract", + "description": "" + }, + "options": {}, + "attributes": { + "language": { + "type": "relation", + "relation": "oneToOne", + "target": "api::language.language" + }, + "status": { + "type": "enumeration", + "enum": [ + "Incomplete", + "Draft", + "Review", + "Done" + ], + "default": "Incomplete", + "required": true + }, + "pages": { + "type": "media", + "multiple": true, + "required": false, + "allowedTypes": [ + "images" + ] + }, + "source_language": { + "type": "relation", + "relation": "oneToOne", + "target": "api::language.language" + }, + "scanners": { + "type": "relation", + "relation": "oneToMany", + "target": "api::recorder.recorder" + }, + "cleaners": { + "type": "relation", + "relation": "oneToMany", + "target": "api::recorder.recorder" + }, + "typesetters": { + "type": "relation", + "relation": "oneToMany", + "target": "api::recorder.recorder" + }, + "notes": { + "type": "text" + } + } +} diff --git a/src/components/sets/text-set.json b/src/components/sets/text-set.json new file mode 100644 index 0000000..3869b0e --- /dev/null +++ b/src/components/sets/text-set.json @@ -0,0 +1,53 @@ +{ + "collectionName": "components_sets_text_sets", + "info": { + "displayName": "text_set", + "icon": "pencil-alt", + "description": "" + }, + "options": {}, + "attributes": { + "language": { + "type": "relation", + "relation": "oneToOne", + "target": "api::language.language" + }, + "status": { + "type": "enumeration", + "enum": [ + "Incomplete", + "Draft", + "Review", + "Done" + ], + "default": "Incomplete", + "required": true + }, + "source_language": { + "type": "relation", + "relation": "oneToOne", + "target": "api::language.language" + }, + "transcribers": { + "type": "relation", + "relation": "oneToMany", + "target": "api::recorder.recorder" + }, + "translators": { + "type": "relation", + "relation": "oneToMany", + "target": "api::recorder.recorder" + }, + "proofreaders": { + "type": "relation", + "relation": "oneToMany", + "target": "api::recorder.recorder" + }, + "notes": { + "type": "text" + }, + "text": { + "type": "richtext" + } + } +} diff --git a/src/components/source/library-text.json b/src/components/source/library-text.json index 21b771c..844d864 100644 --- a/src/components/source/library-text.json +++ b/src/components/source/library-text.json @@ -6,11 +6,5 @@ "description": "" }, "options": {}, - "attributes": { - "text_set": { - "type": "relation", - "relation": "oneToOne", - "target": "api::text-set.text-set" - } - } + "attributes": {} } diff --git a/src/components/translations/title.json b/src/components/translations/title.json new file mode 100644 index 0000000..0cd8bb3 --- /dev/null +++ b/src/components/translations/title.json @@ -0,0 +1,19 @@ +{ + "collectionName": "components_translations_titles", + "info": { + "displayName": "title", + "icon": "feather" + }, + "options": {}, + "attributes": { + "language": { + "type": "relation", + "relation": "oneToOne", + "target": "api::language.language" + }, + "title": { + "type": "string", + "required": true + } + } +}