Add board feature
This commit is contained in:
66
src/api/choral/content-types/choral/schema.json
Normal file
66
src/api/choral/content-types/choral/schema.json
Normal file
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "chorals",
|
||||
"info": {
|
||||
"singularName": "choral",
|
||||
"pluralName": "chorals",
|
||||
"displayName": "Choral",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": false
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"cover": {
|
||||
"type": "media",
|
||||
"multiple": false,
|
||||
"required": false,
|
||||
"allowedTypes": [
|
||||
"images",
|
||||
"files",
|
||||
"videos",
|
||||
"audios"
|
||||
]
|
||||
},
|
||||
"country": {
|
||||
"type": "string"
|
||||
},
|
||||
"address": {
|
||||
"type": "string"
|
||||
},
|
||||
"city": {
|
||||
"type": "string"
|
||||
},
|
||||
"postal": {
|
||||
"type": "integer"
|
||||
},
|
||||
"owner": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "plugin::users-permissions.user",
|
||||
"inversedBy": "choralOwner"
|
||||
},
|
||||
"admins": {
|
||||
"type": "relation",
|
||||
"relation": "manyToMany",
|
||||
"target": "plugin::users-permissions.user",
|
||||
"inversedBy": "choralAdmin"
|
||||
},
|
||||
"users": {
|
||||
"type": "relation",
|
||||
"relation": "manyToMany",
|
||||
"target": "plugin::users-permissions.user",
|
||||
"inversedBy": "chorals"
|
||||
},
|
||||
"boards": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::board.board",
|
||||
"mappedBy": "choral"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/choral/controllers/choral.ts
Normal file
7
src/api/choral/controllers/choral.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* choral controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::choral.choral');
|
||||
7
src/api/choral/routes/choral.ts
Normal file
7
src/api/choral/routes/choral.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* choral router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::choral.choral');
|
||||
7
src/api/choral/services/choral.ts
Normal file
7
src/api/choral/services/choral.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* choral service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::choral.choral');
|
||||
Reference in New Issue
Block a user