generated from UoaWDCC/ssr-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from UoaWDCC/feat/Backend-Schemas
Feat/Backend-Schemas
- Loading branch information
Showing
25 changed files
with
797 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"kind": "collectionType", | ||
"collectionName": "answers", | ||
"info": { | ||
"singularName": "answer", | ||
"pluralName": "answers", | ||
"displayName": "Answer", | ||
"description": "" | ||
}, | ||
"options": { | ||
"draftAndPublish": true | ||
}, | ||
"pluginOptions": {}, | ||
"attributes": { | ||
"Answer": { | ||
"type": "text", | ||
"required": true | ||
}, | ||
"People_ID": { | ||
"type": "relation", | ||
"relation": "manyToOne", | ||
"target": "api::people.people", | ||
"inversedBy": "Answer_ID" | ||
}, | ||
"Question_ID": { | ||
"type": "relation", | ||
"relation": "manyToOne", | ||
"target": "api::question.question", | ||
"inversedBy": "Answer_ID" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
/** | ||
* answer controller | ||
*/ | ||
|
||
const { createCoreController } = require('@strapi/strapi').factories; | ||
|
||
module.exports = createCoreController('api::answer.answer'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
/** | ||
* answer router | ||
*/ | ||
|
||
const { createCoreRouter } = require('@strapi/strapi').factories; | ||
|
||
module.exports = createCoreRouter('api::answer.answer'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
/** | ||
* answer service | ||
*/ | ||
|
||
const { createCoreService } = require('@strapi/strapi').factories; | ||
|
||
module.exports = createCoreService('api::answer.answer'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{ | ||
"kind": "collectionType", | ||
"collectionName": "events", | ||
"info": { | ||
"singularName": "event", | ||
"pluralName": "events", | ||
"displayName": "Event", | ||
"description": "" | ||
}, | ||
"options": { | ||
"draftAndPublish": true | ||
}, | ||
"pluginOptions": {}, | ||
"attributes": { | ||
"Title": { | ||
"type": "string", | ||
"required": true | ||
}, | ||
"Description": { | ||
"type": "text", | ||
"required": true | ||
}, | ||
"Subtitle": { | ||
"type": "string", | ||
"required": false | ||
}, | ||
"Location": { | ||
"type": "string", | ||
"required": true | ||
}, | ||
"Location_Link": { | ||
"type": "string" | ||
}, | ||
"Event_Date_Start": { | ||
"type": "datetime", | ||
"required": true | ||
}, | ||
"Event_Date_End": { | ||
"type": "datetime", | ||
"required": true | ||
}, | ||
"Event_Capacity": { | ||
"type": "integer", | ||
"required": true | ||
}, | ||
"Is_Live": { | ||
"type": "boolean", | ||
"default": false, | ||
"required": true | ||
}, | ||
"Image": { | ||
"type": "media", | ||
"multiple": false, | ||
"required": true, | ||
"allowedTypes": [ | ||
"images" | ||
] | ||
}, | ||
"Terms_And_Conditions": { | ||
"type": "text", | ||
"required": true | ||
}, | ||
"Event_Capacity_Remaining": { | ||
"type": "integer", | ||
"required": true | ||
}, | ||
"Ticket_ID": { | ||
"type": "relation", | ||
"relation": "oneToMany", | ||
"target": "api::ticket.ticket", | ||
"mappedBy": "Event_ID" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
/** | ||
* event controller | ||
*/ | ||
|
||
const { createCoreController } = require('@strapi/strapi').factories; | ||
|
||
module.exports = createCoreController('api::event.event'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
/** | ||
* event router | ||
*/ | ||
|
||
const { createCoreRouter } = require('@strapi/strapi').factories; | ||
|
||
module.exports = createCoreRouter('api::event.event'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
/** | ||
* event service | ||
*/ | ||
|
||
const { createCoreService } = require('@strapi/strapi').factories; | ||
|
||
module.exports = createCoreService('api::event.event'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"kind": "collectionType", | ||
"collectionName": "peoples", | ||
"info": { | ||
"singularName": "people", | ||
"pluralName": "peoples", | ||
"displayName": "People", | ||
"description": "" | ||
}, | ||
"options": { | ||
"draftAndPublish": true | ||
}, | ||
"pluginOptions": {}, | ||
"attributes": { | ||
"Name": { | ||
"type": "string", | ||
"required": true | ||
}, | ||
"Email": { | ||
"type": "string", | ||
"required": true | ||
}, | ||
"University_ID": { | ||
"type": "string", | ||
"required": false | ||
}, | ||
"UPI": { | ||
"type": "string", | ||
"required": false | ||
}, | ||
"Year_Of_Study": { | ||
"type": "string", | ||
"required": false | ||
}, | ||
"Study_Field": { | ||
"type": "string", | ||
"required": false | ||
}, | ||
"Is_Member": { | ||
"type": "boolean", | ||
"default": false, | ||
"required": true | ||
}, | ||
"Status": { | ||
"type": "enumeration", | ||
"enum": [ | ||
"Domestic", | ||
"International" | ||
], | ||
"required": true | ||
}, | ||
"Member_Expiry_Date": { | ||
"type": "date", | ||
"required": true | ||
}, | ||
"People_Ticket_ID": { | ||
"type": "relation", | ||
"relation": "oneToMany", | ||
"target": "api::user-ticket.user-ticket", | ||
"mappedBy": "People_ID" | ||
}, | ||
"Answer_ID": { | ||
"type": "relation", | ||
"relation": "oneToMany", | ||
"target": "api::answer.answer", | ||
"mappedBy": "People_ID" | ||
}, | ||
"Institution": { | ||
"type": "enumeration", | ||
"enum": [ | ||
"UoA", | ||
"AUT", | ||
"Other", | ||
"None" | ||
], | ||
"required": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
/** | ||
* people controller | ||
*/ | ||
|
||
const { createCoreController } = require('@strapi/strapi').factories; | ||
|
||
module.exports = createCoreController('api::people.people'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
/** | ||
* people router | ||
*/ | ||
|
||
const { createCoreRouter } = require('@strapi/strapi').factories; | ||
|
||
module.exports = createCoreRouter('api::people.people'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
/** | ||
* people service | ||
*/ | ||
|
||
const { createCoreService } = require('@strapi/strapi').factories; | ||
|
||
module.exports = createCoreService('api::people.people'); |
37 changes: 37 additions & 0 deletions
37
strapi/src/api/question/content-types/question/schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"kind": "collectionType", | ||
"collectionName": "questions", | ||
"info": { | ||
"singularName": "question", | ||
"pluralName": "questions", | ||
"displayName": "Question", | ||
"description": "" | ||
}, | ||
"options": { | ||
"draftAndPublish": true | ||
}, | ||
"pluginOptions": {}, | ||
"attributes": { | ||
"Question": { | ||
"type": "string", | ||
"required": true | ||
}, | ||
"Check_For_Member_Email": { | ||
"type": "boolean", | ||
"required": true, | ||
"default": false | ||
}, | ||
"Ticket_ID": { | ||
"type": "relation", | ||
"relation": "manyToOne", | ||
"target": "api::ticket.ticket", | ||
"inversedBy": "Question_ID" | ||
}, | ||
"Answer_ID": { | ||
"type": "relation", | ||
"relation": "oneToMany", | ||
"target": "api::answer.answer", | ||
"mappedBy": "Question_ID" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
/** | ||
* question controller | ||
*/ | ||
|
||
const { createCoreController } = require('@strapi/strapi').factories; | ||
|
||
module.exports = createCoreController('api::question.question'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
/** | ||
* question router | ||
*/ | ||
|
||
const { createCoreRouter } = require('@strapi/strapi').factories; | ||
|
||
module.exports = createCoreRouter('api::question.question'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
/** | ||
* question service | ||
*/ | ||
|
||
const { createCoreService } = require('@strapi/strapi').factories; | ||
|
||
module.exports = createCoreService('api::question.question'); |
Oops, something went wrong.