Finished adding the other content collections
This commit is contained in:
parent
3f3f1f16a6
commit
2befffdcfe
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "library_contents",
|
||||
"info": {
|
||||
"singularName": "library-content",
|
||||
"pluralName": "library-contents",
|
||||
"displayName": "Library Content",
|
||||
"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.video-range"
|
||||
],
|
||||
"required": true,
|
||||
"max": 1
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* library-content controller
|
||||
*/
|
||||
|
||||
const { createCoreController } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreController('api::library-content.library-content');
|
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* library-content router.
|
||||
*/
|
||||
|
||||
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreRouter('api::library-content.library-content');
|
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* library-content service.
|
||||
*/
|
||||
|
||||
const { createCoreService } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreService('api::library-content.library-content');
|
|
@ -72,7 +72,8 @@
|
|||
"type": "dynamiczone",
|
||||
"components": [
|
||||
"metadata.books",
|
||||
"metadata.video"
|
||||
"metadata.video",
|
||||
"metadata.game"
|
||||
],
|
||||
"max": 1
|
||||
},
|
||||
|
@ -81,6 +82,12 @@
|
|||
"repeatable": false,
|
||||
"pluginOptions": {},
|
||||
"component": "basics.size"
|
||||
},
|
||||
"contents": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::library-content.library-content",
|
||||
"mappedBy": "library_item"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "scan_sets",
|
||||
"info": {
|
||||
"singularName": "scan-set",
|
||||
"pluralName": "scan-sets",
|
||||
"displayName": "Scan Set",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* scan-set controller
|
||||
*/
|
||||
|
||||
const { createCoreController } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreController('api::scan-set.scan-set');
|
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* scan-set router.
|
||||
*/
|
||||
|
||||
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreRouter('api::scan-set.scan-set');
|
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* scan-set service.
|
||||
*/
|
||||
|
||||
const { createCoreService } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreService('api::scan-set.scan-set');
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "text_sets",
|
||||
"info": {
|
||||
"singularName": "text-set",
|
||||
"pluralName": "text-sets",
|
||||
"displayName": "Text Set",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* text-set controller
|
||||
*/
|
||||
|
||||
const { createCoreController } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreController('api::text-set.text-set');
|
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* text-set router.
|
||||
*/
|
||||
|
||||
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreRouter('api::text-set.text-set');
|
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* text-set service.
|
||||
*/
|
||||
|
||||
const { createCoreService } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreService('api::text-set.text-set');
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"collectionName": "components_basics_sources",
|
||||
"info": {
|
||||
"displayName": "Source",
|
||||
"icon": "book-reader",
|
||||
"description": ""
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"scanners": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::recorder.recorder"
|
||||
},
|
||||
"cleaners": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::recorder.recorder"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"typesetters": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::recorder.recorder"
|
||||
},
|
||||
"source_language": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "api::language.language"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"collectionName": "components_metadata_games",
|
||||
"info": {
|
||||
"displayName": "Game",
|
||||
"icon": "gamepad"
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"game_platform": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "api::game-platform.game-platform"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"collectionName": "components_range_page_ranges",
|
||||
"info": {
|
||||
"displayName": "Page Range",
|
||||
"icon": "book-medical"
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"starting_page": {
|
||||
"type": "integer",
|
||||
"min": 1
|
||||
},
|
||||
"ending_page": {
|
||||
"type": "integer",
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"collectionName": "components_range_video_ranges",
|
||||
"info": {
|
||||
"displayName": "Video Range",
|
||||
"icon": "file-video"
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"starting_time": {
|
||||
"type": "time"
|
||||
},
|
||||
"ending_time": {
|
||||
"type": "time"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"collectionName": "components_translations_library_contents",
|
||||
"info": {
|
||||
"displayName": "Library Content",
|
||||
"icon": "torah"
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"language": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "api::language.language"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"collectionName": "components_translations_scan_sets",
|
||||
"info": {
|
||||
"displayName": "Scan Set",
|
||||
"icon": "book-open",
|
||||
"description": ""
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"language": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "api::language.language"
|
||||
},
|
||||
"pages": {
|
||||
"type": "media",
|
||||
"multiple": true,
|
||||
"required": false,
|
||||
"allowedTypes": [
|
||||
"images"
|
||||
]
|
||||
},
|
||||
"source": {
|
||||
"displayName": "Source",
|
||||
"type": "component",
|
||||
"repeatable": false,
|
||||
"component": "basics.source",
|
||||
"required": true
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"collectionName": "components_translations_text_sets",
|
||||
"info": {
|
||||
"displayName": "Text Set",
|
||||
"icon": "align-center",
|
||||
"description": ""
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"text": {
|
||||
"type": "richtext"
|
||||
},
|
||||
"source": {
|
||||
"type": "component",
|
||||
"repeatable": false,
|
||||
"component": "basics.source",
|
||||
"required": true
|
||||
},
|
||||
"language": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "api::language.language"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue