@ozdao/prometheus-framework 0.2.60 → 0.2.62
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +8 -190
- package/dist/auth.server.mjs +8 -190
- package/dist/community.server.js +3 -2
- package/dist/community.server.mjs +2 -1
- package/dist/events.server.js +101 -29
- package/dist/events.server.mjs +100 -28
- package/dist/files.server.js +7 -7
- package/dist/files.server.mjs +7 -7
- package/dist/gallery.server.js +2 -2
- package/dist/gallery.server.mjs +2 -2
- package/dist/main-DsseFd2d.mjs +13753 -0
- package/dist/main-U466Gwzt.js +91 -0
- package/dist/main.css +1 -1
- package/dist/metadata.schema-CS6_9GLU.js +174 -0
- package/dist/metadata.schema-D88c1Ebp.mjs +175 -0
- package/dist/organizations.server.js +212 -16
- package/dist/organizations.server.mjs +212 -16
- package/dist/ownership.schema-DN0SlQL6.js +36 -0
- package/dist/ownership.schema-oyx6eNkZ.mjs +37 -0
- package/dist/products.server.js +8 -5
- package/dist/products.server.mjs +8 -5
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +19 -14
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +1 -55
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +55 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +27 -27
- package/dist/prometheus-framework/src/components/Loader/Loader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Loader/Loader.vue.js +1 -51
- package/dist/prometheus-framework/src/components/Loader/Loader.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Loader/Loader.vue2.js +51 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -97
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +97 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +1 -36
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +36 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/auth.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/auth.client.js +12 -14
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +197 -183
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +168 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue2.js +1 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.js +11 -2
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +67 -64
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +13 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +1 -13
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +24 -24
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +40 -38
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js +19 -19
- package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.js +5 -5
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.js +36 -27
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +20 -20
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +36 -50
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +2 -2
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/web-D7bW32Ul.mjs +54 -0
- package/dist/web-DpE9HxA3.js +1 -0
- package/package.json +1 -1
- package/src/components/Chips/Chips.vue +2 -2
- package/src/components/Feed/Feed.vue +2 -1
- package/src/modules/auth/auth.client.js +0 -2
- package/src/modules/auth/auth.server.js +1 -6
- package/src/modules/auth/components/pages/Invite.vue +1 -1
- package/src/modules/events/components/pages/EditEvent.vue +19 -0
- package/src/modules/events/components/pages/EditEventTickets.vue +194 -0
- package/src/modules/events/controllers/tickets.controller.js +103 -28
- package/src/modules/events/models/ticket.model.js +22 -4
- package/src/modules/events/router/events.js +5 -0
- package/src/modules/events/routes/tickets.routes.js +2 -2
- package/src/modules/events/store/tickets.js +1 -0
- package/src/modules/globals/components/blocks/CardHeader.vue +6 -6
- package/src/modules/organizations/components/pages/Members.vue +1 -1
- package/src/modules/organizations/components/pages/Organization.vue +4 -4
- package/src/modules/organizations/components/sections/MembersAdd.vue +1 -1
- package/src/modules/organizations/controllers/departments.controller.js +14 -1
- package/src/modules/organizations/models/department.model.js +5 -1
- package/src/modules/organizations/organizations.client.js +2 -0
- package/src/modules/organizations/organizations.server.js +6 -2
- package/src/modules/organizations/routes/departments.routes.js +1 -1
- package/src/modules/organizations/store/departments.js +3 -2
- package/src/modules/products/components/blocks/CardLeftover.vue +19 -7
- package/src/modules/products/components/pages/EditLeftover.vue +1 -1
- package/src/modules/products/components/pages/Leftovers.vue +14 -3
- package/src/modules/products/components/pages/Products.vue +8 -8
- package/src/modules/products/models/leftover.model.js +9 -5
- package/src/modules/users/models/client.model.js +60 -0
- /package/src/modules/{auth → organizations}/controllers/invites.controller.js +0 -0
- /package/src/modules/{auth → organizations}/models/invite.model.js +0 -0
- /package/src/modules/{auth → organizations}/routes/invites.routes.js +0 -0
- /package/src/modules/{auth → organizations}/store/invites.js +0 -0
@@ -1,8 +1,17 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="flex-column pos-relative flex-wrap
|
2
|
+
<div class="flex-column pos-relative flex-wrap">
|
3
|
+
<CardHeader
|
4
|
+
:entity="leftover"
|
5
|
+
:entityType="'leftover'"
|
6
|
+
:user="user"
|
7
|
+
:owner="leftover.creator"
|
8
|
+
:creator="leftover.creator"
|
9
|
+
:date="leftover.createdAt"
|
10
|
+
/>
|
11
|
+
|
3
12
|
<div class="w-100 mn-b-thin flex">
|
4
13
|
<p class="p-big">
|
5
|
-
{{leftover.type}}
|
14
|
+
{{leftover.type}}
|
6
15
|
</p>
|
7
16
|
<IconEdit
|
8
17
|
@click="$router.push({
|
@@ -16,14 +25,16 @@
|
|
16
25
|
/>
|
17
26
|
</div>
|
18
27
|
|
19
|
-
|
20
|
-
|
28
|
+
|
29
|
+
|
30
|
+
<div class="w-100 bg-white radius-small pd-small spoiler">
|
31
|
+
<div @click="spoiler = !spoiler" class="flex">
|
21
32
|
<span>Всего товаров {{leftover.positions.length}}</span>
|
22
33
|
<!-- <img :class="{ 'spoiler-active': spoiler }" class="button-icon" src="@/assets/icons/arrow-down-spoiler.svg"> -->
|
23
34
|
</div>
|
24
35
|
<transition name="fade">
|
25
36
|
<div v-if="spoiler">
|
26
|
-
<div v-for="position in leftover.positions" class="w-100 mn-b-thin flex">
|
37
|
+
<div v-for="position in leftover.positions" class="mn-t-small w-100 mn-b-thin flex">
|
27
38
|
<div class=" w-50 flex">
|
28
39
|
<span>
|
29
40
|
<!-- <span class="t-transp">Название:</span> -->
|
@@ -43,7 +54,7 @@
|
|
43
54
|
</transition>
|
44
55
|
</div>
|
45
56
|
|
46
|
-
|
57
|
+
|
47
58
|
</div>
|
48
59
|
</template>
|
49
60
|
|
@@ -52,11 +63,12 @@
|
|
52
63
|
import { ref } from 'vue'
|
53
64
|
import { useRouter } from 'vue-router'
|
54
65
|
|
66
|
+
import CardHeader from '@pf/src/modules/globals/components/blocks/CardHeader.vue'
|
67
|
+
|
55
68
|
// Icons
|
56
69
|
import IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'
|
57
70
|
import PlaceholderUserpic from '@pf/src/modules/icons/placeholders/PlaceholderUserpic.vue'
|
58
71
|
|
59
|
-
|
60
72
|
const router = useRouter()
|
61
73
|
|
62
74
|
const props = defineProps({
|
@@ -69,7 +69,7 @@
|
|
69
69
|
<CardLeftover
|
70
70
|
v-for="leftover in items"
|
71
71
|
:leftover="leftover"
|
72
|
-
class="bg-grey pd-small radius-
|
72
|
+
class="bg-grey pd-small mn-b-thin radius-small"
|
73
73
|
/>
|
74
74
|
</Feed>
|
75
75
|
</div>
|
@@ -95,9 +95,20 @@
|
|
95
95
|
const totalPrice = computed(() => {
|
96
96
|
return leftovers.state.all.reduce((totalSum, item) => {
|
97
97
|
const itemTotal = item.positions.reduce((sum, position) => {
|
98
|
-
return sum +
|
98
|
+
return sum + position.price;
|
99
99
|
}, 0);
|
100
|
-
|
100
|
+
|
101
|
+
// Adjust the sum based on the type of transaction
|
102
|
+
if (item.type === 'stock-in') {
|
103
|
+
// If it's a stock-in, subtract the itemTotal from the totalSum
|
104
|
+
return totalSum - itemTotal;
|
105
|
+
} else if (item.type === 'stock-out') {
|
106
|
+
// If it's a stock-out, add the itemTotal to the totalSum
|
107
|
+
return totalSum + itemTotal;
|
108
|
+
} else {
|
109
|
+
// If the item type is not specified or is different, do not adjust the totalSum
|
110
|
+
return totalSum;
|
111
|
+
}
|
101
112
|
}, 0);
|
102
113
|
});
|
103
114
|
|
@@ -12,7 +12,7 @@
|
|
12
12
|
+
|
13
13
|
</button>
|
14
14
|
</header>
|
15
|
-
|
15
|
+
<!--
|
16
16
|
<Tab
|
17
17
|
v-if="route.name !== 'Organization'"
|
18
18
|
v-model:selected="tab"
|
@@ -24,7 +24,7 @@
|
|
24
24
|
]"
|
25
25
|
class="mn-b-small o-hidden h5 radius-big bg-grey"
|
26
26
|
/>
|
27
|
-
|
27
|
+
-->
|
28
28
|
<div class="cols-2-1_3 bg-grey pd-thin radius-big gap-thin">
|
29
29
|
|
30
30
|
<FilterProducts
|
@@ -37,7 +37,7 @@
|
|
37
37
|
placeholder="Enter product name"
|
38
38
|
class="bg-white mn-b-thin"
|
39
39
|
/>
|
40
|
-
|
40
|
+
{{tab}}
|
41
41
|
<Feed
|
42
42
|
:states="{
|
43
43
|
empty: {
|
@@ -104,13 +104,13 @@
|
|
104
104
|
const router = useRouter()
|
105
105
|
|
106
106
|
// Tab logic
|
107
|
-
const tab = ref(route.query.tab ? route.query.tab : 'all')
|
107
|
+
// const tab = ref(route.query.tab ? route.query.tab : 'all')
|
108
108
|
|
109
|
-
route.query.tab = tab.value
|
109
|
+
// route.query.tab = tab.value
|
110
110
|
|
111
|
-
watch(tab, (newValue) => {
|
112
|
-
|
113
|
-
});
|
111
|
+
// watch(tab, (newValue) => {
|
112
|
+
// router.replace({ query: { ...route.query, tab: newValue } });
|
113
|
+
// });
|
114
114
|
|
115
115
|
function updateSearch(search) {
|
116
116
|
let query = { ...route.query}
|
@@ -1,7 +1,9 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
const applyOwnershipSchema = require('@pf/src/modules/globals/models/ownership.schema.js');
|
2
|
+
|
3
|
+
module.exports = (db) => {
|
4
|
+
const LeftoverSchema = new db.mongoose.Schema({
|
3
5
|
organization: {
|
4
|
-
type: mongoose.Schema.Types.ObjectId,
|
6
|
+
type: db.mongoose.Schema.Types.ObjectId,
|
5
7
|
ref: 'Organization',
|
6
8
|
},
|
7
9
|
type: {
|
@@ -18,7 +20,7 @@ module.exports = (mongoose) => {
|
|
18
20
|
},
|
19
21
|
positions: [{
|
20
22
|
_id: {
|
21
|
-
type: mongoose.Schema.Types.ObjectId,
|
23
|
+
type: db.mongoose.Schema.Types.ObjectId,
|
22
24
|
ref: 'Product',
|
23
25
|
},
|
24
26
|
name: {
|
@@ -40,9 +42,11 @@ module.exports = (mongoose) => {
|
|
40
42
|
}
|
41
43
|
});
|
42
44
|
|
45
|
+
applyOwnershipSchema(LeftoverSchema,db);
|
46
|
+
|
43
47
|
LeftoverSchema.index({ user: 1, type: 1, target: 1 });
|
44
48
|
|
45
|
-
const Leftover = mongoose.model('Leftover', LeftoverSchema);
|
49
|
+
const Leftover = db.mongoose.model('Leftover', LeftoverSchema);
|
46
50
|
|
47
51
|
return Leftover;
|
48
52
|
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
module.exports = (mongoose) => {
|
2
|
+
|
3
|
+
const ClientSchema = new mongoose.Schema({
|
4
|
+
phone: String,
|
5
|
+
email: String,
|
6
|
+
|
7
|
+
status: {
|
8
|
+
type: String,
|
9
|
+
enum: ['new','lost','converted'],
|
10
|
+
default: 'new',
|
11
|
+
required: true,
|
12
|
+
},
|
13
|
+
|
14
|
+
profile: {
|
15
|
+
photo: {
|
16
|
+
type: String,
|
17
|
+
default: ''
|
18
|
+
},
|
19
|
+
name: {
|
20
|
+
type: String,
|
21
|
+
default: ''
|
22
|
+
},
|
23
|
+
description: {
|
24
|
+
type: String,
|
25
|
+
default: ''
|
26
|
+
},
|
27
|
+
birthday: {
|
28
|
+
type: Date,
|
29
|
+
}
|
30
|
+
},
|
31
|
+
|
32
|
+
socials: {
|
33
|
+
telegram: {
|
34
|
+
type: String,
|
35
|
+
default: ''
|
36
|
+
},
|
37
|
+
twitter: {
|
38
|
+
type: String,
|
39
|
+
default: ''
|
40
|
+
},
|
41
|
+
facebook: {
|
42
|
+
type: String,
|
43
|
+
default: ''
|
44
|
+
},
|
45
|
+
instagram: {
|
46
|
+
type: String,
|
47
|
+
default: ''
|
48
|
+
}
|
49
|
+
},
|
50
|
+
},{
|
51
|
+
// Creation Date
|
52
|
+
timestamps: { currentTime: () => Date.now()
|
53
|
+
}
|
54
|
+
|
55
|
+
});
|
56
|
+
|
57
|
+
const Client = mongoose.model("Client", ClientSchema);
|
58
|
+
|
59
|
+
return Client;
|
60
|
+
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|