@duvdu-v1/duvdu 1.1.263 → 1.1.264
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.
- package/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/build/models/copyright-contract.model.js +5 -1
- package/build/models/projectContract.model.js +5 -1
- package/build/models/teamProject.model.js +6 -1
- package/build/models/transactions.model.d.ts +42 -0
- package/build/models/transactions.model.js +20 -0
- package/build/types/model-names.d.ts +2 -1
- package/build/types/model-names.js +1 -0
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -82,6 +82,7 @@ export * from './models/favourites.model';
|
|
|
82
82
|
export * from './models/Bookmark.model';
|
|
83
83
|
export * from './models/Bookmark-projects.model';
|
|
84
84
|
export * from './models/contractCancel.model';
|
|
85
|
+
export * from './models/transactions.model';
|
|
85
86
|
export * from './services/category.service';
|
|
86
87
|
export * from './services/projectView.service';
|
|
87
88
|
export * from './services/rank.service';
|
package/build/index.js
CHANGED
|
@@ -99,6 +99,7 @@ __exportStar(require("./models/favourites.model"), exports);
|
|
|
99
99
|
__exportStar(require("./models/Bookmark.model"), exports);
|
|
100
100
|
__exportStar(require("./models/Bookmark-projects.model"), exports);
|
|
101
101
|
__exportStar(require("./models/contractCancel.model"), exports);
|
|
102
|
+
__exportStar(require("./models/transactions.model"), exports);
|
|
102
103
|
__exportStar(require("./services/category.service"), exports);
|
|
103
104
|
__exportStar(require("./services/projectView.service"), exports);
|
|
104
105
|
__exportStar(require("./services/rank.service"), exports);
|
|
@@ -60,7 +60,11 @@ exports.CopyrightContracts = (0, mongoose_1.model)(model_names_1.MODELS.copyrigh
|
|
|
60
60
|
paymentLink: { type: String, default: null },
|
|
61
61
|
requestedDeadline: {
|
|
62
62
|
deadline: { type: Date, default: null },
|
|
63
|
-
status: {
|
|
63
|
+
status: {
|
|
64
|
+
type: String,
|
|
65
|
+
enum: RequestedDeadlineStatus,
|
|
66
|
+
default: RequestedDeadlineStatus.pending,
|
|
67
|
+
},
|
|
64
68
|
user: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.user, default: null },
|
|
65
69
|
},
|
|
66
70
|
}, { collection: model_names_1.MODELS.copyrightContract, timestamps: true }));
|
|
@@ -69,7 +69,11 @@ exports.ProjectContract = (0, mongoose_1.model)(model_names_1.MODELS.projectCont
|
|
|
69
69
|
],
|
|
70
70
|
requestedDeadline: {
|
|
71
71
|
deadline: { type: Date, default: null },
|
|
72
|
-
status: {
|
|
72
|
+
status: {
|
|
73
|
+
type: String,
|
|
74
|
+
enum: copyright_contract_model_1.RequestedDeadlineStatus,
|
|
75
|
+
default: copyright_contract_model_1.RequestedDeadlineStatus.pending,
|
|
76
|
+
},
|
|
73
77
|
user: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.user, default: null },
|
|
74
78
|
},
|
|
75
79
|
}, { timestamps: true, collection: model_names_1.MODELS.projectContract }));
|
|
@@ -11,7 +11,12 @@ exports.TeamProject = (0, mongoose_1.model)(model_names_1.MODELS.teamProject, ne
|
|
|
11
11
|
desc: { type: String, default: null },
|
|
12
12
|
location: { lat: { type: Number, default: null }, lng: { type: Number, default: null } },
|
|
13
13
|
address: { type: String, default: null },
|
|
14
|
-
relatedContracts: [
|
|
14
|
+
relatedContracts: [
|
|
15
|
+
{
|
|
16
|
+
category: { type: mongoose_1.Types.ObjectId, ref: model_names_1.MODELS.category },
|
|
17
|
+
contracts: [{ contract: { type: mongoose_1.Types.ObjectId, ref: model_names_1.MODELS.projectContract } }],
|
|
18
|
+
},
|
|
19
|
+
],
|
|
15
20
|
isDeleted: { type: Boolean, default: false },
|
|
16
21
|
cycle: { type: String, default: cycles_1.CYCLES.teamProject },
|
|
17
22
|
}, {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/types" />
|
|
2
|
+
/// <reference types="mongoose/types/document" />
|
|
3
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
4
|
+
/// <reference types="mongoose/types/callback" />
|
|
5
|
+
/// <reference types="mongoose/types/collection" />
|
|
6
|
+
/// <reference types="mongoose/types/connection" />
|
|
7
|
+
/// <reference types="mongoose/types/cursor" />
|
|
8
|
+
/// <reference types="mongoose/types/error" />
|
|
9
|
+
/// <reference types="mongoose/types/expressions" />
|
|
10
|
+
/// <reference types="mongoose/types/helpers" />
|
|
11
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
12
|
+
/// <reference types="mongoose/types/indexes" />
|
|
13
|
+
/// <reference types="mongoose/types/models" />
|
|
14
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
15
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
16
|
+
/// <reference types="mongoose/types/populate" />
|
|
17
|
+
/// <reference types="mongoose/types/query" />
|
|
18
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
19
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
20
|
+
/// <reference types="mongoose/types/session" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
import { Types } from 'mongoose';
|
|
26
|
+
export declare enum TransactionStatus {
|
|
27
|
+
PENDING = "pending",
|
|
28
|
+
SUCCESS = "success",
|
|
29
|
+
FAILED = "failed"
|
|
30
|
+
}
|
|
31
|
+
export interface ITransaction {
|
|
32
|
+
currency: string;
|
|
33
|
+
amount: number;
|
|
34
|
+
user: Types.ObjectId;
|
|
35
|
+
contract: Types.ObjectId;
|
|
36
|
+
status: string;
|
|
37
|
+
timeStamp: Date;
|
|
38
|
+
model: string;
|
|
39
|
+
}
|
|
40
|
+
export declare const Transaction: import("mongoose").Model<ITransaction, {}, {}, {}, import("mongoose").Document<unknown, {}, ITransaction> & ITransaction & {
|
|
41
|
+
_id: Types.ObjectId;
|
|
42
|
+
}, any>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Transaction = exports.TransactionStatus = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const model_names_1 = require("../types/model-names");
|
|
6
|
+
var TransactionStatus;
|
|
7
|
+
(function (TransactionStatus) {
|
|
8
|
+
TransactionStatus["PENDING"] = "pending";
|
|
9
|
+
TransactionStatus["SUCCESS"] = "success";
|
|
10
|
+
TransactionStatus["FAILED"] = "failed";
|
|
11
|
+
})(TransactionStatus || (exports.TransactionStatus = TransactionStatus = {}));
|
|
12
|
+
exports.Transaction = (0, mongoose_1.model)(model_names_1.MODELS.transaction, new mongoose_1.Schema({
|
|
13
|
+
currency: { type: String, default: 'EGP' },
|
|
14
|
+
amount: { type: Number, default: 0 },
|
|
15
|
+
user: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.user },
|
|
16
|
+
contract: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.contracts },
|
|
17
|
+
status: { type: String, default: TransactionStatus.PENDING },
|
|
18
|
+
timeStamp: { type: Date, default: Date.now },
|
|
19
|
+
model: { type: String, default: null },
|
|
20
|
+
}));
|