Commit d2aec1a8 by jaymehta

reviews and newsletter entities

1 parent e909a086
...@@ -41,6 +41,12 @@ ...@@ -41,6 +41,12 @@
"relation": "oneToMany", "relation": "oneToMany",
"target": "api::wishlist.wishlist", "target": "api::wishlist.wishlist",
"mappedBy": "endUser" "mappedBy": "endUser"
},
"reviews": {
"type": "relation",
"relation": "oneToMany",
"target": "api::review.review",
"mappedBy": "endUser"
} }
} }
} }
...@@ -170,6 +170,12 @@ ...@@ -170,6 +170,12 @@
"type": "component", "type": "component",
"repeatable": true, "repeatable": true,
"component": "images.images" "component": "images.images"
},
"reviews": {
"type": "relation",
"relation": "oneToMany",
"target": "api::review.review",
"mappedBy": "experience"
} }
} }
} }
{
"kind": "collectionType",
"collectionName": "newsletters",
"info": {
"singularName": "newsletter",
"pluralName": "newsletters",
"displayName": "Newsletter"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"email": {
"type": "string"
}
}
}
'use strict';
/**
* newsletter controller
*/
const { createCoreController } = require('@strapi/strapi').factories;
module.exports = createCoreController('api::newsletter.newsletter');
'use strict';
/**
* newsletter router
*/
const { createCoreRouter } = require('@strapi/strapi').factories;
module.exports = createCoreRouter('api::newsletter.newsletter');
'use strict';
/**
* newsletter service
*/
const { createCoreService } = require('@strapi/strapi').factories;
module.exports = createCoreService('api::newsletter.newsletter');
{
"kind": "collectionType",
"collectionName": "reviews",
"info": {
"singularName": "review",
"pluralName": "reviews",
"displayName": "Reviews"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"endUser": {
"type": "relation",
"relation": "manyToOne",
"target": "api::end-user.end-user",
"inversedBy": "reviews"
},
"experience": {
"type": "relation",
"relation": "manyToOne",
"target": "api::experience.experience",
"inversedBy": "reviews"
},
"comments": {
"type": "text"
},
"rating": {
"type": "integer"
}
}
}
'use strict';
/**
* review controller
*/
const { createCoreController } = require('@strapi/strapi').factories;
module.exports = createCoreController('api::review.review');
'use strict';
/**
* review router
*/
const { createCoreRouter } = require('@strapi/strapi').factories;
module.exports = createCoreRouter('api::review.review');
'use strict';
/**
* review service
*/
const { createCoreService } = require('@strapi/strapi').factories;
module.exports = createCoreService('api::review.review');
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!