@duvdu-v1/duvdu 1.1.353 → 1.1.355
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -51,4 +51,4 @@ exports.ContractReports = (0, mongoose_1.model)(model_names_1.MODELS.contractRep
|
|
|
51
51
|
ref: model_names_1.MODELS.user,
|
|
52
52
|
default: null,
|
|
53
53
|
},
|
|
54
|
-
}, { collection: model_names_1.MODELS.contractReports, timestamps: true })
|
|
54
|
+
}, { collection: model_names_1.MODELS.contractReports, timestamps: true }));
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// disable eslint for this file
|
|
3
|
+
/* eslint-disable */
|
|
2
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
5
|
exports.ProjectContract = exports.ProjectContractStatus = void 0;
|
|
4
6
|
const mongoose_1 = require("mongoose");
|
|
@@ -20,7 +22,7 @@ const generateTicketNumber = () => {
|
|
|
20
22
|
const random = Math.floor(100000 + Math.random() * 900000); // 6-digit random number
|
|
21
23
|
return `PRJC${random}`;
|
|
22
24
|
};
|
|
23
|
-
|
|
25
|
+
const projectContractSchema = new mongoose_1.Schema({
|
|
24
26
|
sp: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.user },
|
|
25
27
|
ticketNumber: { type: String, default: generateTicketNumber, unique: true, sparse: true },
|
|
26
28
|
customer: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.user },
|
|
@@ -60,6 +62,7 @@ exports.ProjectContract = (0, mongoose_1.model)(model_names_1.MODELS.projectCont
|
|
|
60
62
|
secondPaymentAmount: { type: Number, default: 0 },
|
|
61
63
|
status: { type: String, enum: ProjectContractStatus },
|
|
62
64
|
rejectedBy: { type: String, enum: ['sp', 'customer'], default: null },
|
|
65
|
+
canceledBy: { type: String, enum: ['sp', 'customer', 'system'], default: null },
|
|
63
66
|
paymentLink: String,
|
|
64
67
|
duration: { type: Number, default: 0 },
|
|
65
68
|
equipmentPrice: { type: Number, default: 0 },
|
|
@@ -81,5 +84,5 @@ exports.ProjectContract = (0, mongoose_1.model)(model_names_1.MODELS.projectCont
|
|
|
81
84
|
},
|
|
82
85
|
user: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.user, default: null },
|
|
83
86
|
},
|
|
84
|
-
}, { timestamps: true, collection: model_names_1.MODELS.projectContract })
|
|
85
|
-
|
|
87
|
+
}, { timestamps: true, collection: model_names_1.MODELS.projectContract });
|
|
88
|
+
exports.ProjectContract = (0, mongoose_1.model)(model_names_1.MODELS.projectContract, projectContractSchema);
|