-
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 branch 'dev' into eunice/resolver
- Loading branch information
Showing
28 changed files
with
1,310 additions
and
145 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,138 @@ | ||
{ | ||
"promotionInput": { | ||
"id": "6009f0cd3e809ad222fe06e9", | ||
"promotionNm": "CNY Promo", | ||
"promotionStart": "2021-01-29T15:24:51.425Z", | ||
"promotionEnd": "2021-01-31T15:24:51.425Z", | ||
"image": { | ||
"id": "", | ||
"imageSize": 123.12, | ||
"imageURL": "https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.locusassignments.com%2Fmethods-of-sales-promotion-at-the-consumers-level%2F&psig=AOvVaw3CcIcjVCsAw8ANAJU8eWx2&ust=1611350730564000&source=images&cd=vfe&ved=0CAIQjRxqFwoTCKDKz7H7re4CFQAAAAAdAAAAABAD", | ||
"imageFileNm": "image.png", | ||
"imageType": "png" | ||
}, | ||
"promotionService": [ | ||
{ | ||
"id": "", | ||
"serviceNm": "battery renewal", | ||
"isDispatchAvailable": true, | ||
"isInHouseAvailable": true, | ||
"estimatedServiceTime": 360000.0 | ||
} | ||
], | ||
"promotionBranch": [ | ||
{ | ||
"id": "", | ||
"branchAddr": "UM Pantai Dalam", | ||
"branchContactNo": "+60143360623" | ||
} | ||
], | ||
"promoCode": "Ong ah", | ||
"discountAmt": 0.52 | ||
} | ||
} | ||
|
||
// query{ | ||
// promotions(filter: "{}"){ | ||
// id | ||
// promotionNm | ||
// promotionStart | ||
// promotionEnd | ||
// image{ | ||
// imageURL | ||
// imageSize | ||
// } | ||
// promotionService{ | ||
// estimatedServiceTime | ||
// } | ||
// promotionBranch{ | ||
// branchAddr | ||
// } | ||
// promoCode | ||
// discountAmt | ||
// } | ||
// } | ||
|
||
// query{ | ||
// promotion(id: "6009f06e986f5fd215abd071"){ | ||
// id | ||
// promotionNm | ||
// promotionStart | ||
// promotionEnd | ||
// image{ | ||
// imageURL | ||
// imageSize | ||
// } | ||
// promotionService{ | ||
// estimatedServiceTime | ||
// } | ||
// promotionBranch{ | ||
// branchAddr | ||
// } | ||
// promoCode | ||
// discountAmt | ||
// } | ||
// } | ||
|
||
// mutation CreatePromotion($promotionInput: PromotionInput!){ | ||
// createPromotion(promotionInput: $promotionInput){ | ||
// id | ||
// promotionNm | ||
// promotionStart | ||
// promotionEnd | ||
// image{ | ||
// imageURL | ||
// imageSize | ||
// } | ||
// promotionService{ | ||
// estimatedServiceTime | ||
// } | ||
// promotionBranch{ | ||
// branchAddr | ||
// } | ||
// promoCode | ||
// discountAmt | ||
// } | ||
// } | ||
|
||
// mutation{ | ||
// deletePromotion(id: "6009f06e986f5fd215abd071"){ | ||
// id | ||
// promotionNm | ||
// promotionStart | ||
// promotionEnd | ||
// image{ | ||
// imageURL | ||
// imageSize | ||
// } | ||
// promotionService{ | ||
// estimatedServiceTime | ||
// } | ||
// promotionBranch{ | ||
// branchAddr | ||
// } | ||
// promoCode | ||
// discountAmt | ||
// } | ||
// } | ||
|
||
// mutation UpdatePromotion($promotionInput: PromotionInput!){ | ||
// updatePromotion(promotionInput: $promotionInput){ | ||
// id | ||
// promotionNm | ||
// promotionStart | ||
// promotionEnd | ||
// image{ | ||
// imageURL | ||
// imageSize | ||
// } | ||
// promotionService{ | ||
// estimatedServiceTime | ||
// } | ||
// promotionBranch{ | ||
// branchAddr | ||
// } | ||
// promoCode | ||
// discountAmt | ||
// } | ||
// } |
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,59 @@ | ||
{ | ||
"serviceInput": { | ||
"id": "600a0c69d574e6d7928b04dc", | ||
"serviceNm": "ABC - Brake belt replacement", | ||
"isDispatchAvailable": true, | ||
"isInHouseAvailable": true, | ||
"estimatedServiceTime": 360000.0 | ||
} | ||
} | ||
|
||
// mutation CreateService($serviceInput: ServiceInput!){ | ||
// createService(serviceInput: $serviceInput){ | ||
// id | ||
// isInHouseAvailable | ||
// isDispatchAvailable | ||
// estimatedServiceTime | ||
// serviceNm | ||
// } | ||
// } | ||
|
||
// mutation{ | ||
// deleteService(id: "600a0bc4993b90d755db3e7c"){ | ||
// id | ||
// isInHouseAvailable | ||
// isDispatchAvailable | ||
// estimatedServiceTime | ||
// serviceNm | ||
// } | ||
// } | ||
|
||
// mutation UpdateService($serviceInput: ServiceInput!){ | ||
// updateService(serviceInput: $serviceInput){ | ||
// id | ||
// serviceNm | ||
// isInHouseAvailable | ||
// isDispatchAvailable | ||
// estimatedServiceTime | ||
// } | ||
// } | ||
|
||
// query{ | ||
// services(filter: "{}"){ | ||
// id | ||
// serviceNm | ||
// isInHouseAvailable | ||
// isDispatchAvailable | ||
// estimatedServiceTime | ||
// } | ||
// } | ||
|
||
// query{ | ||
// service(id: "600a0c69d574e6d7928b04dc"){ | ||
// id | ||
// serviceNm | ||
// isInHouseAvailable | ||
// isDispatchAvailable | ||
// estimatedServiceTime | ||
// } | ||
// } |
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,16 @@ | ||
{ | ||
"userInput": { | ||
"id": null, | ||
"type": "BRANDOWNER", | ||
"firstName": "ROOT", | ||
"lastName": "USER", | ||
"password": "12345", | ||
"dateOfBirth": "898531200000", | ||
"contactNo": "+60143360623", | ||
"email": "root@temp.com", | ||
"ip": null, | ||
"vehicle": null, | ||
"employeeType": "NONE", | ||
"favouriteBranch": null | ||
} | ||
} |
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,49 @@ | ||
// query{ | ||
// videoStorages(filter: "{}"){ | ||
// id | ||
// videoURL | ||
// videoSize | ||
// videoType | ||
// videoFileNm | ||
// } | ||
// } | ||
|
||
// query{ | ||
// videoStorage(id: "600a75d18027d8df7e394660"){ | ||
// id | ||
// videoURL | ||
// videoSize | ||
// videoType | ||
// videoFileNm | ||
// } | ||
// } | ||
|
||
// mutation UpdateVideoStorage($videoStorageInput: VideoStorageInput!){ | ||
// updateVideoStorage(videoStorageInput: $videoStorageInput){ | ||
// id | ||
// videoURL | ||
// videoSize | ||
// videoType | ||
// videoFileNm | ||
// } | ||
// } | ||
|
||
// mutation CreateVideoStorage($videoStorageInput: VideoStorageInput!){ | ||
// createVideoStorage(videoStorageInput: $videoStorageInput){ | ||
// id | ||
// videoURL | ||
// videoSize | ||
// videoType | ||
// videoFileNm | ||
// } | ||
// } | ||
|
||
{ | ||
"videoStorageInput": { | ||
"id": null, | ||
"videoSize": 123.12, | ||
"videoURL": "https://www.youtube.com/watch?v=3fGQ8pF3wYU", | ||
"videoType": "youtube", | ||
"videoFileNm": "The Sad Reality" | ||
} | ||
} |
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,4 @@ | ||
export const CONVERSATION_TYPE = { | ||
"PERSONAL": "PERSONAL", | ||
"GROUP": "GROUP" | ||
} |
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,7 @@ | ||
export const DISPATCH_SERVICE_STATUS = { | ||
"PENDING": "PENDING", | ||
"REJECTED": "REJECTED", | ||
"ACCEPTED": "ACCEPTED", | ||
"COMPLETED": "COMPLETED", | ||
"CANCELLED": "CANCELLED" | ||
} |
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
export { EMPLOYEE_TYPE, USER_TYPE } from "./User"; | ||
export { DISPATCH_SERVICE_STATUS } from "./DispatchService"; | ||
export { CONVERSATION_TYPE } from "./Conversation"; |
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 |
---|---|---|
@@ -1,8 +1,15 @@ | ||
import mongoose from "mongoose"; | ||
import mongoose, { Schema } from "mongoose"; | ||
import User from "./User"; | ||
|
||
const ConversationSchema = new mongoose.Schema({ | ||
conversationID: Number, | ||
type: String, | ||
conversationName: String, | ||
members: [ | ||
{ | ||
type: Schema.Types.ObjectId, | ||
ref: "User" | ||
} | ||
] | ||
}); | ||
|
||
export default mongoose.model("Conversation", ConversationSchema); |
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
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
Oops, something went wrong.