@duvdu-v1/duvdu 1.1.140 → 1.1.141
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/rental.model.d.ts +76 -0
- package/build/models/rental.model.js +38 -0
- package/package.json +57 -57
package/build/index.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ export * from './models/ranks.model';
|
|
|
68
68
|
export * from './models/settings.model';
|
|
69
69
|
export * from './models/all-contracts.model';
|
|
70
70
|
export * from './models/producer_contracts.model';
|
|
71
|
+
export * from './models/rental.model';
|
|
71
72
|
export * from './services/category.service';
|
|
72
73
|
export * from './services/projectView.service';
|
|
73
74
|
export * from './types/notification.type';
|
package/build/index.js
CHANGED
|
@@ -85,6 +85,7 @@ __exportStar(require("./models/ranks.model"), exports);
|
|
|
85
85
|
__exportStar(require("./models/settings.model"), exports);
|
|
86
86
|
__exportStar(require("./models/all-contracts.model"), exports);
|
|
87
87
|
__exportStar(require("./models/producer_contracts.model"), exports);
|
|
88
|
+
__exportStar(require("./models/rental.model"), exports);
|
|
88
89
|
__exportStar(require("./services/category.service"), exports);
|
|
89
90
|
__exportStar(require("./services/projectView.service"), exports);
|
|
90
91
|
__exportStar(require("./types/notification.type"), exports);
|
|
@@ -0,0 +1,76 @@
|
|
|
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 { Icategory, Iuser } from '@duvdu-v1/duvdu';
|
|
26
|
+
import { Types } from 'mongoose';
|
|
27
|
+
export declare enum RentalUnits {
|
|
28
|
+
minutes = "minutes",
|
|
29
|
+
hours = "hours",
|
|
30
|
+
days = "days",
|
|
31
|
+
months = "months",
|
|
32
|
+
weeks = "weeks"
|
|
33
|
+
}
|
|
34
|
+
export interface Irental {
|
|
35
|
+
id: string;
|
|
36
|
+
user: Types.ObjectId | Iuser;
|
|
37
|
+
category: Types.ObjectId | Icategory;
|
|
38
|
+
subCategory: {
|
|
39
|
+
ar: string;
|
|
40
|
+
en: string;
|
|
41
|
+
};
|
|
42
|
+
tags: {
|
|
43
|
+
ar: string;
|
|
44
|
+
en: string;
|
|
45
|
+
}[];
|
|
46
|
+
attachments: string[];
|
|
47
|
+
cover: string;
|
|
48
|
+
title: string;
|
|
49
|
+
phoneNumber: string;
|
|
50
|
+
email: string;
|
|
51
|
+
description: string;
|
|
52
|
+
location: {
|
|
53
|
+
lat: number;
|
|
54
|
+
lng: number;
|
|
55
|
+
};
|
|
56
|
+
address: string;
|
|
57
|
+
searchKeywords: string[];
|
|
58
|
+
insurance: number;
|
|
59
|
+
showOnHome: boolean;
|
|
60
|
+
projectScale: {
|
|
61
|
+
unit: RentalUnits;
|
|
62
|
+
minimum: number;
|
|
63
|
+
maximum: number;
|
|
64
|
+
pricerPerUnit: number;
|
|
65
|
+
};
|
|
66
|
+
isDeleted: boolean;
|
|
67
|
+
rate: {
|
|
68
|
+
ratersCounter: number;
|
|
69
|
+
totalRates: number;
|
|
70
|
+
};
|
|
71
|
+
createdAt: Date;
|
|
72
|
+
updatedAt: Date;
|
|
73
|
+
}
|
|
74
|
+
export declare const Rentals: import("mongoose").Model<Irental, {}, {}, {}, import("mongoose").Document<unknown, {}, Irental> & Irental & {
|
|
75
|
+
_id: Types.ObjectId;
|
|
76
|
+
}, any>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Rentals = exports.RentalUnits = void 0;
|
|
4
|
+
const duvdu_1 = require("@duvdu-v1/duvdu");
|
|
5
|
+
const mongoose_1 = require("mongoose");
|
|
6
|
+
var RentalUnits;
|
|
7
|
+
(function (RentalUnits) {
|
|
8
|
+
RentalUnits["minutes"] = "minutes";
|
|
9
|
+
RentalUnits["hours"] = "hours";
|
|
10
|
+
RentalUnits["days"] = "days";
|
|
11
|
+
RentalUnits["months"] = "months";
|
|
12
|
+
RentalUnits["weeks"] = "weeks";
|
|
13
|
+
})(RentalUnits || (exports.RentalUnits = RentalUnits = {}));
|
|
14
|
+
exports.Rentals = (0, mongoose_1.model)('rentals', new mongoose_1.Schema({
|
|
15
|
+
user: { type: mongoose_1.Schema.Types.ObjectId, ref: duvdu_1.MODELS.user },
|
|
16
|
+
category: { type: mongoose_1.Schema.Types.ObjectId, ref: duvdu_1.MODELS.category },
|
|
17
|
+
subCategory: { ar: String, en: String },
|
|
18
|
+
tags: [{ ar: String, en: String }],
|
|
19
|
+
attachments: [String],
|
|
20
|
+
cover: String,
|
|
21
|
+
title: String,
|
|
22
|
+
phoneNumber: String,
|
|
23
|
+
email: String,
|
|
24
|
+
description: String,
|
|
25
|
+
location: { lat: Number, lng: Number },
|
|
26
|
+
address: String,
|
|
27
|
+
searchKeywords: [String],
|
|
28
|
+
insurance: Number,
|
|
29
|
+
showOnHome: { type: Boolean, default: true },
|
|
30
|
+
projectScale: {
|
|
31
|
+
unit: { type: String, enum: RentalUnits },
|
|
32
|
+
minimum: Number,
|
|
33
|
+
maximum: Number,
|
|
34
|
+
pricerPerUnit: Number,
|
|
35
|
+
},
|
|
36
|
+
isDeleted: { type: Boolean, default: false },
|
|
37
|
+
rate: { ratersCounter: Number, totalRates: Number },
|
|
38
|
+
}, { collection: 'rentals', timestamps: true }).index({ createdAt: 1, updatedAt: -1 }));
|
package/package.json
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@duvdu-v1/duvdu",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"main": "./build/index.js",
|
|
5
|
-
"types": "./build/index.d.ts",
|
|
6
|
-
"files": [
|
|
7
|
-
"build/**/*"
|
|
8
|
-
],
|
|
9
|
-
"scripts": {
|
|
10
|
-
"clean": "rimraf ./build",
|
|
11
|
-
"build": "npm run clean && tsc",
|
|
12
|
-
"fix:build": "mv ./build/common/src/* ./build && rm -rf ./build/auth ./build/common",
|
|
13
|
-
"pub": "git add . && git commit -m \"updates\" && npm version patch && npm run build && npm publish",
|
|
14
|
-
"lint": "eslint .",
|
|
15
|
-
"lint:fix": "eslint --fix .",
|
|
16
|
-
"format": "prettier --write ."
|
|
17
|
-
},
|
|
18
|
-
"keywords": [],
|
|
19
|
-
"author": "motemed khaled",
|
|
20
|
-
"license": "ISC",
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"@duvdu-v1/duvdu": "^1.1.116",
|
|
23
|
-
"@types/express": "^4.17.21",
|
|
24
|
-
"@types/express-session": "^1.18.0",
|
|
25
|
-
"@types/jsonwebtoken": "^9.0.5",
|
|
26
|
-
"@types/multer": "^1.4.11",
|
|
27
|
-
"@types/node": "^20.11.0",
|
|
28
|
-
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
29
|
-
"@typescript-eslint/parser": "^6.19.0",
|
|
30
|
-
"aws-sdk": "^2.1595.0",
|
|
31
|
-
"connect-redis": "^7.1.1",
|
|
32
|
-
"express": "^4.18.2",
|
|
33
|
-
"express-async-errors": "^3.1.1",
|
|
34
|
-
"express-session": "^1.18.0",
|
|
35
|
-
"express-validator": "^7.0.1",
|
|
36
|
-
"jsonwebtoken": "^9.0.2",
|
|
37
|
-
"mongoose": "^8.0.4",
|
|
38
|
-
"multer": "^1.4.5-lts.1",
|
|
39
|
-
"node-nats-streaming": "^0.3.2",
|
|
40
|
-
"redis": "^4.6.13",
|
|
41
|
-
"rimraf": "^5.0.5",
|
|
42
|
-
"typescript": "^5.3.3",
|
|
43
|
-
"uuid": "^9.0.1",
|
|
44
|
-
"winston": "^3.13.0",
|
|
45
|
-
"winston-daily-rotate-file": "^5.0.0"
|
|
46
|
-
},
|
|
47
|
-
"devDependencies": {
|
|
48
|
-
"@types/uuid": "^9.0.8",
|
|
49
|
-
"del-cli": "^5.1.0",
|
|
50
|
-
"eslint": "^8.56.0",
|
|
51
|
-
"eslint-config-prettier": "^9.1.0",
|
|
52
|
-
"eslint-plugin-import": "^2.29.1",
|
|
53
|
-
"eslint-plugin-prettier": "^5.1.3",
|
|
54
|
-
"prettier": "^3.2.4"
|
|
55
|
-
},
|
|
56
|
-
"description": ""
|
|
57
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@duvdu-v1/duvdu",
|
|
3
|
+
"version": "1.1.141",
|
|
4
|
+
"main": "./build/index.js",
|
|
5
|
+
"types": "./build/index.d.ts",
|
|
6
|
+
"files": [
|
|
7
|
+
"build/**/*"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"clean": "rimraf ./build",
|
|
11
|
+
"build": "npm run clean && tsc",
|
|
12
|
+
"fix:build": "mv ./build/common/src/* ./build && rm -rf ./build/auth ./build/common",
|
|
13
|
+
"pub": "git add . && git commit -m \"updates\" && npm version patch && npm run build && npm publish",
|
|
14
|
+
"lint": "eslint .",
|
|
15
|
+
"lint:fix": "eslint --fix .",
|
|
16
|
+
"format": "prettier --write ."
|
|
17
|
+
},
|
|
18
|
+
"keywords": [],
|
|
19
|
+
"author": "motemed khaled",
|
|
20
|
+
"license": "ISC",
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@duvdu-v1/duvdu": "^1.1.116",
|
|
23
|
+
"@types/express": "^4.17.21",
|
|
24
|
+
"@types/express-session": "^1.18.0",
|
|
25
|
+
"@types/jsonwebtoken": "^9.0.5",
|
|
26
|
+
"@types/multer": "^1.4.11",
|
|
27
|
+
"@types/node": "^20.11.0",
|
|
28
|
+
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
29
|
+
"@typescript-eslint/parser": "^6.19.0",
|
|
30
|
+
"aws-sdk": "^2.1595.0",
|
|
31
|
+
"connect-redis": "^7.1.1",
|
|
32
|
+
"express": "^4.18.2",
|
|
33
|
+
"express-async-errors": "^3.1.1",
|
|
34
|
+
"express-session": "^1.18.0",
|
|
35
|
+
"express-validator": "^7.0.1",
|
|
36
|
+
"jsonwebtoken": "^9.0.2",
|
|
37
|
+
"mongoose": "^8.0.4",
|
|
38
|
+
"multer": "^1.4.5-lts.1",
|
|
39
|
+
"node-nats-streaming": "^0.3.2",
|
|
40
|
+
"redis": "^4.6.13",
|
|
41
|
+
"rimraf": "^5.0.5",
|
|
42
|
+
"typescript": "^5.3.3",
|
|
43
|
+
"uuid": "^9.0.1",
|
|
44
|
+
"winston": "^3.13.0",
|
|
45
|
+
"winston-daily-rotate-file": "^5.0.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@types/uuid": "^9.0.8",
|
|
49
|
+
"del-cli": "^5.1.0",
|
|
50
|
+
"eslint": "^8.56.0",
|
|
51
|
+
"eslint-config-prettier": "^9.1.0",
|
|
52
|
+
"eslint-plugin-import": "^2.29.1",
|
|
53
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
54
|
+
"prettier": "^3.2.4"
|
|
55
|
+
},
|
|
56
|
+
"description": ""
|
|
57
|
+
}
|