Work on ad and social
This commit is contained in:
63
src/api/ad/content-types/ad/schema.json
Normal file
63
src/api/ad/content-types/ad/schema.json
Normal file
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "ads",
|
||||
"info": {
|
||||
"singularName": "ad",
|
||||
"pluralName": "ads",
|
||||
"displayName": "Ad",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": false
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"category": {
|
||||
"type": "enumeration",
|
||||
"enum": [
|
||||
"hire",
|
||||
"equipment",
|
||||
"management",
|
||||
"sheetmusic",
|
||||
"local"
|
||||
]
|
||||
},
|
||||
"description": {
|
||||
"type": "text"
|
||||
},
|
||||
"validUntil": {
|
||||
"type": "date"
|
||||
},
|
||||
"author": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "plugin::users-permissions.user"
|
||||
},
|
||||
"views": {
|
||||
"type": "integer"
|
||||
},
|
||||
"applies": {
|
||||
"type": "integer"
|
||||
},
|
||||
"location": {
|
||||
"type": "component",
|
||||
"repeatable": false,
|
||||
"component": "address.full-address"
|
||||
},
|
||||
"contactname": {
|
||||
"type": "string"
|
||||
},
|
||||
"contactemail": {
|
||||
"type": "string"
|
||||
},
|
||||
"contactphone": {
|
||||
"type": "string"
|
||||
},
|
||||
"featured": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/ad/controllers/ad.ts
Normal file
7
src/api/ad/controllers/ad.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* ad controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::ad.ad');
|
||||
7
src/api/ad/routes/ad.ts
Normal file
7
src/api/ad/routes/ad.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* ad router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::ad.ad');
|
||||
7
src/api/ad/services/ad.ts
Normal file
7
src/api/ad/services/ad.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* ad service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::ad.ad');
|
||||
Reference in New Issue
Block a user