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');
|
||||
34
src/api/comment/content-types/comment/schema.json
Normal file
34
src/api/comment/content-types/comment/schema.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "comments",
|
||||
"info": {
|
||||
"singularName": "comment",
|
||||
"pluralName": "comments",
|
||||
"displayName": "Comment",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": false
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"likes": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "plugin::users-permissions.user"
|
||||
},
|
||||
"owner": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "plugin::users-permissions.user"
|
||||
},
|
||||
"replies": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::comment.comment"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/comment/controllers/comment.ts
Normal file
7
src/api/comment/controllers/comment.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* comment controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::comment.comment');
|
||||
7
src/api/comment/routes/comment.ts
Normal file
7
src/api/comment/routes/comment.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* comment router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::comment.comment');
|
||||
7
src/api/comment/services/comment.ts
Normal file
7
src/api/comment/services/comment.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* comment service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::comment.comment');
|
||||
43
src/api/group/content-types/group/schema.json
Normal file
43
src/api/group/content-types/group/schema.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "groups",
|
||||
"info": {
|
||||
"singularName": "group",
|
||||
"pluralName": "groups",
|
||||
"displayName": "Group"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": false
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "text"
|
||||
},
|
||||
"banner": {
|
||||
"allowedTypes": [
|
||||
"images",
|
||||
"files",
|
||||
"videos",
|
||||
"audios"
|
||||
],
|
||||
"type": "media",
|
||||
"multiple": false
|
||||
},
|
||||
"users": {
|
||||
"type": "relation",
|
||||
"relation": "manyToMany",
|
||||
"target": "plugin::users-permissions.user",
|
||||
"inversedBy": "groups"
|
||||
},
|
||||
"owner": {
|
||||
"type": "relation",
|
||||
"relation": "manyToOne",
|
||||
"target": "plugin::users-permissions.user",
|
||||
"inversedBy": "groups"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/group/controllers/group.ts
Normal file
7
src/api/group/controllers/group.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* group controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::group.group');
|
||||
7
src/api/group/routes/group.ts
Normal file
7
src/api/group/routes/group.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* group router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::group.group');
|
||||
7
src/api/group/services/group.ts
Normal file
7
src/api/group/services/group.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* group service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::group.group');
|
||||
57
src/api/post/content-types/post/schema.json
Normal file
57
src/api/post/content-types/post/schema.json
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "posts",
|
||||
"info": {
|
||||
"singularName": "post",
|
||||
"pluralName": "posts",
|
||||
"displayName": "Post",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": false
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"content": {
|
||||
"type": "text"
|
||||
},
|
||||
"media": {
|
||||
"type": "media",
|
||||
"multiple": true,
|
||||
"required": false,
|
||||
"allowedTypes": [
|
||||
"images",
|
||||
"files",
|
||||
"videos",
|
||||
"audios"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": "relation",
|
||||
"relation": "manyToOne",
|
||||
"target": "plugin::users-permissions.user",
|
||||
"inversedBy": "posts"
|
||||
},
|
||||
"likes": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "plugin::users-permissions.user"
|
||||
},
|
||||
"category": {
|
||||
"type": "enumeration",
|
||||
"enum": [
|
||||
"photo",
|
||||
"video",
|
||||
"event"
|
||||
]
|
||||
},
|
||||
"comments": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::comment.comment"
|
||||
},
|
||||
"shares": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/post/controllers/post.ts
Normal file
7
src/api/post/controllers/post.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* post controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::post.post');
|
||||
7
src/api/post/routes/post.ts
Normal file
7
src/api/post/routes/post.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* post router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::post.post');
|
||||
7
src/api/post/services/post.ts
Normal file
7
src/api/post/services/post.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* post service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::post.post');
|
||||
34
src/api/report/content-types/report/schema.json
Normal file
34
src/api/report/content-types/report/schema.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "reports",
|
||||
"info": {
|
||||
"singularName": "report",
|
||||
"pluralName": "reports",
|
||||
"displayName": "report",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": false
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"details": {
|
||||
"type": "text"
|
||||
},
|
||||
"reason": {
|
||||
"type": "enumeration",
|
||||
"enum": [
|
||||
"inappropriate",
|
||||
"fraudulent",
|
||||
"duplicate",
|
||||
"expired",
|
||||
"other"
|
||||
]
|
||||
},
|
||||
"reporter": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "plugin::users-permissions.user"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/report/controllers/report.ts
Normal file
7
src/api/report/controllers/report.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* report controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::report.report');
|
||||
7
src/api/report/routes/report.ts
Normal file
7
src/api/report/routes/report.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* report router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::report.report');
|
||||
7
src/api/report/services/report.ts
Normal file
7
src/api/report/services/report.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* report service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::report.report');
|
||||
35
src/components/address/full-address.json
Normal file
35
src/components/address/full-address.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"collectionName": "components_address_full_addresses",
|
||||
"info": {
|
||||
"displayName": "FullAddress",
|
||||
"icon": "pinMap",
|
||||
"description": ""
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"freeaddress": {
|
||||
"type": "string"
|
||||
},
|
||||
"housenumber": {
|
||||
"type": "string"
|
||||
},
|
||||
"road": {
|
||||
"type": "string"
|
||||
},
|
||||
"city": {
|
||||
"type": "string"
|
||||
},
|
||||
"country": {
|
||||
"type": "string"
|
||||
},
|
||||
"postcode": {
|
||||
"type": "string"
|
||||
},
|
||||
"long": {
|
||||
"type": "decimal"
|
||||
},
|
||||
"lat": {
|
||||
"type": "decimal"
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -181,6 +181,23 @@
|
||||
"relation": "oneToMany",
|
||||
"target": "api::announcement.announcement",
|
||||
"mappedBy": "author"
|
||||
},
|
||||
"posts": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::post.post",
|
||||
"mappedBy": "author"
|
||||
},
|
||||
"groups": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::group.group",
|
||||
"mappedBy": "owner"
|
||||
},
|
||||
"friends": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "plugin::users-permissions.user"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user