@duvdu-v1/duvdu 1.1.125 → 1.1.127
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.
|
@@ -38,7 +38,8 @@ const categorySchema = new mongoose_1.default.Schema({
|
|
|
38
38
|
type: Boolean,
|
|
39
39
|
default: true,
|
|
40
40
|
},
|
|
41
|
-
trend: { type: Boolean, default: false }
|
|
41
|
+
trend: { type: Boolean, default: false },
|
|
42
|
+
media: { type: String, enum: ['image', 'video', 'audio'] }
|
|
42
43
|
}, {
|
|
43
44
|
timestamps: true,
|
|
44
45
|
collection: model_names_1.MODELS.category,
|
|
@@ -22,47 +22,52 @@
|
|
|
22
22
|
/// <reference types="mongoose/types/validation" />
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
import { Iuser } from '@duvdu-v1/duvdu';
|
|
25
26
|
import { Types } from 'mongoose';
|
|
26
|
-
|
|
27
|
-
export interface IportfolioPost {
|
|
28
|
-
id: string;
|
|
27
|
+
export interface IprojectCycle {
|
|
29
28
|
user: Types.ObjectId | Iuser;
|
|
30
|
-
|
|
29
|
+
category: Types.ObjectId | Iuser;
|
|
30
|
+
subCategory: {
|
|
31
|
+
ar: string;
|
|
32
|
+
en: string;
|
|
33
|
+
};
|
|
34
|
+
tags: {
|
|
35
|
+
ar: string;
|
|
36
|
+
en: string;
|
|
37
|
+
}[];
|
|
31
38
|
cover: string;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
attachments: string[];
|
|
40
|
+
name: string;
|
|
41
|
+
description: string;
|
|
35
42
|
tools: {
|
|
36
43
|
name: string;
|
|
37
|
-
|
|
38
|
-
}[];
|
|
39
|
-
searchKeywords: string[];
|
|
40
|
-
creatives: {
|
|
41
|
-
creative: Types.ObjectId | Iuser;
|
|
42
|
-
fees: number;
|
|
44
|
+
unitPrice: number;
|
|
43
45
|
}[];
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
functions: {
|
|
47
|
+
name: string;
|
|
48
|
+
unitPrice: number;
|
|
47
49
|
}[];
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
creatives: Types.ObjectId[] | Iuser[];
|
|
51
|
+
location: {
|
|
52
|
+
lat: number;
|
|
53
|
+
lng: number;
|
|
51
54
|
};
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
address: string;
|
|
56
|
+
searchKeyWords: string[];
|
|
57
|
+
insurance: number;
|
|
58
|
+
showOnHome: boolean;
|
|
54
59
|
projectScale: {
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
unit: string;
|
|
61
|
+
minimum: number;
|
|
62
|
+
maximum: number;
|
|
63
|
+
pricerPerUnit: number;
|
|
57
64
|
};
|
|
58
|
-
|
|
59
|
-
cycle: string;
|
|
65
|
+
isDeleted: boolean;
|
|
60
66
|
rate: {
|
|
61
67
|
ratersCounter: number;
|
|
62
68
|
totalRates: number;
|
|
63
69
|
};
|
|
64
|
-
isDeleted: boolean;
|
|
65
70
|
}
|
|
66
|
-
export declare const
|
|
71
|
+
export declare const ProjectCycle: import("mongoose").Model<IprojectCycle, {}, {}, {}, import("mongoose").Document<unknown, {}, IprojectCycle> & IprojectCycle & {
|
|
67
72
|
_id: Types.ObjectId;
|
|
68
73
|
}, any>;
|
|
@@ -1,50 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ProjectCycle = void 0;
|
|
4
|
+
const duvdu_1 = require("@duvdu-v1/duvdu");
|
|
4
5
|
const mongoose_1 = require("mongoose");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
exports.ProjectCycle = (0, mongoose_1.model)(duvdu_1.MODELS.portfolioPost, new mongoose_1.Schema({
|
|
7
|
+
user: { type: mongoose_1.Schema.Types.ObjectId, ref: duvdu_1.MODELS.user },
|
|
8
|
+
category: { type: mongoose_1.Schema.Types.ObjectId, ref: duvdu_1.MODELS.category },
|
|
9
|
+
subCategory: { ar: { type: String, default: null }, en: { type: String, default: null } },
|
|
10
|
+
tags: [{ ar: { type: String, default: null }, en: { type: String, default: null } }],
|
|
10
11
|
cover: { type: String, default: null },
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
attachments: [{ type: String, default: null }],
|
|
13
|
+
name: { type: String, default: null },
|
|
14
|
+
description: { type: String, default: null },
|
|
15
|
+
tools: [{ name: { type: String, default: null }, unitPrice: { type: Number, default: 0 } }],
|
|
16
|
+
functions: [{ name: { type: String, default: null }, unitPrice: { type: Number, default: 0 } }],
|
|
17
|
+
creatives: [{ type: mongoose_1.Schema.Types.ObjectId, ref: duvdu_1.MODELS.user }],
|
|
18
|
+
location: { lat: { type: Number, default: 0 }, lng: { type: Number, default: 0 } },
|
|
13
19
|
address: { type: String, default: null },
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
creatives: [
|
|
17
|
-
{
|
|
18
|
-
creative: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.user },
|
|
19
|
-
fees: { type: Number, default: null },
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
tags: [{ ar: { type: String, default: null }, en: { type: String, default: null } }],
|
|
23
|
-
subCategory: {
|
|
24
|
-
ar: String,
|
|
25
|
-
en: String,
|
|
26
|
-
},
|
|
27
|
-
projectBudget: { type: Number, default: null },
|
|
28
|
-
category: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.category, required: true },
|
|
29
|
-
projectScale: { scale: { type: Number, default: 0 }, time: { type: String, default: null } },
|
|
20
|
+
searchKeyWords: [String],
|
|
21
|
+
insurance: { type: Number, default: 0 },
|
|
30
22
|
showOnHome: { type: Boolean, default: true },
|
|
31
|
-
|
|
23
|
+
projectScale: { unit: String, minimum: Number, maximum: Number, pricerPerUnit: Number },
|
|
32
24
|
isDeleted: { type: Boolean, default: false },
|
|
33
|
-
rate: {
|
|
34
|
-
|
|
35
|
-
totalRates: { type: Number, default: 0 },
|
|
36
|
-
},
|
|
37
|
-
}, {
|
|
38
|
-
timestamps: true,
|
|
39
|
-
collection: model_names_1.MODELS.portfolioPost,
|
|
40
|
-
toJSON: {
|
|
41
|
-
transform(doc, ret) {
|
|
42
|
-
if (ret.cover)
|
|
43
|
-
ret.cover = process.env.BUCKET_HOST + '/' + ret.cover;
|
|
44
|
-
if (ret.attachments)
|
|
45
|
-
ret.attachments = ret.attachments.map((el) => process.env.BUCKET_HOST + '/' + el);
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
})
|
|
49
|
-
.index({ createdAt: 1, updatedAt: -1 })
|
|
50
|
-
.index({ title: 'text', desc: 'text', tools: 'text', searchKeywords: 'text' }));
|
|
25
|
+
rate: { ratersCounter: Number, totalRates: Number },
|
|
26
|
+
}, { timestamps: true, collection: duvdu_1.MODELS.portfolioPost }));
|
package/build/types/cycles.d.ts
CHANGED
package/build/types/cycles.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CYCLES = void 0;
|
|
4
4
|
var CYCLES;
|
|
5
5
|
(function (CYCLES) {
|
|
6
|
-
CYCLES["portfolioPost"] = "
|
|
6
|
+
CYCLES["portfolioPost"] = "project";
|
|
7
7
|
CYCLES["studioBooking"] = "studio-booking";
|
|
8
8
|
CYCLES["copyRights"] = "copy-rights";
|
|
9
9
|
CYCLES["teamProject"] = "team-project";
|