@ozdao/prometheus-framework 0.1.32 → 0.1.34
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Chips-41cd6570.mjs +203 -0
- package/dist/Chips-c3d7341e.js +1 -0
- package/dist/EULA-e05236af.mjs +4210 -0
- package/dist/EULA-f5fba925.js +1 -0
- package/dist/Feed-046852fc.js +1 -0
- package/dist/Feed-4efa2a93.mjs +394 -0
- package/dist/Feed-acfbb839.mjs +371 -0
- package/dist/Feed-e6e84388.js +1 -0
- package/dist/Image-93c3a270.mjs +480 -0
- package/dist/Image-de94b883.js +9 -0
- package/dist/Product-1892b14a.js +7 -0
- package/dist/Product-d3f1d10a.mjs +844 -0
- package/dist/ProductEdit-8e779ed8.js +1 -0
- package/dist/ProductEdit-ebcc3f98.mjs +306 -0
- package/dist/ProfileBlogposts-8c10a505.js +1 -0
- package/dist/ProfileBlogposts-a2f7cd4c.mjs +70 -0
- package/dist/ProfileEvents-47409c9e.mjs +62 -0
- package/dist/ProfileEvents-db12cf78.js +1 -0
- package/dist/auth.server.js +4 -4
- package/dist/auth.server.mjs +4 -4
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +217 -241
- package/dist/community.server.js +2 -2
- package/dist/community.server.mjs +2 -2
- package/dist/events.client.cjs +1 -1
- package/dist/events.client.js +4 -4
- package/dist/events.server.js +361 -224
- package/dist/events.server.mjs +361 -224
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/legal.client.cjs +1 -1
- package/dist/legal.client.js +1 -1
- package/dist/modules/community/components/sections/Feed.vue.d.ts +2 -0
- package/dist/organizations.client-76c3660a.mjs +3072 -0
- package/dist/organizations.client-ddbf8809.js +3 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +4 -4
- package/dist/organizations.server.js +4 -4
- package/dist/organizations.server.mjs +4 -4
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +2 -2
- package/dist/users.server.js +2 -2
- package/dist/users.server.mjs +2 -2
- package/package.json +1 -1
- package/src/components/CardHeader/CardHeader.vue +3 -3
- package/src/modules/community/components/blocks/CardBlogpost.vue +2 -4
- package/src/modules/community/components/sections/Feed.vue +44 -39
- package/src/modules/community/components/sections/HotPosts.vue +9 -56
- package/src/modules/events/components/blocks/CardEvent.vue +0 -2
- package/src/modules/events/controllers/events.controller.js +55 -265
- package/src/modules/events/controllers/utils/queryProcessor.js +118 -0
- package/src/modules/events/models/event.new.model.js +76 -0
- package/src/modules/files/middlewares/server/middlewareMulter.js +1 -0
- package/src/modules/globals/controllers/utils/queryProcessor.js +228 -0
- package/src/modules/globals/models/common.schema.js +14 -0
- package/src/modules/globals/models/engagement.schema.js +10 -0
- package/src/modules/globals/models/metadata.schema.js +15 -0
- package/src/modules/globals/models/ownership.schema.js +34 -0
- package/src/modules/globals/utils/seo-friendly-url.js +28 -0
- package/src/modules/legal/components/pages/legal/EULA.vue +0 -3
- package/src/modules/products/controllers/categories.controller.js +3 -0
- package/src/modules/products/models/category.model.js +63 -13
- package/src/modules/products/models/leftover.model.js +38 -17
- package/src/modules/products/models/modification.model.js +31 -14
- package/src/modules/products/models/product.model.js +37 -38
- package/src/modules/products/products.server.js +11 -1
@@ -1,42 +1,41 @@
|
|
1
|
-
|
1
|
+
module.exports = (mongoose) => {
|
2
|
+
const ProductSchema = new mongoose.Schema({
|
3
|
+
owner: {
|
4
|
+
type: mongoose.Schema.Types.ObjectId,
|
5
|
+
ref: 'User',
|
6
|
+
},
|
7
|
+
organization: {
|
8
|
+
type: mongoose.Schema.Types.ObjectId,
|
9
|
+
ref: 'Organization',
|
10
|
+
},
|
11
|
+
status: {type: String},
|
12
|
+
name: {type: String},
|
13
|
+
category: {type: Array},
|
14
|
+
description: {type: String},
|
15
|
+
sale: {type: Number},
|
16
|
+
price: {type: Number},
|
17
|
+
coverImage: {type: String},
|
18
|
+
images: {type: Array},
|
19
|
+
popularity: {type: Number},
|
20
|
+
localization: {type: Array},
|
21
|
+
information: [{
|
22
|
+
name: {type: String},
|
23
|
+
value: {type: String}
|
24
|
+
}],
|
25
|
+
// MoySklad
|
26
|
+
quantity: {type: Number},
|
27
|
+
}, {
|
28
|
+
timestamps: {
|
29
|
+
currentTime: () => Date.now()
|
30
|
+
}
|
31
|
+
});
|
2
32
|
|
3
|
-
|
33
|
+
ProductSchema.index({ organization: 1 }); // Создаем индекс
|
34
|
+
ProductSchema.index({ category: 1 }); // Создаем индекс
|
35
|
+
ProductSchema.index({ price: 1 }); // Создаем индекс
|
4
36
|
|
5
|
-
const ProductSchema = new mongoose.Schema({
|
6
|
-
owner: {
|
7
|
-
type: mongoose.Schema.Types.ObjectId,
|
8
|
-
ref: 'User',
|
9
|
-
},
|
10
|
-
organization: {
|
11
|
-
type: mongoose.Schema.Types.ObjectId,
|
12
|
-
ref: 'Organization',
|
13
|
-
},
|
14
|
-
status: {type: String},
|
15
|
-
name: {type: String},
|
16
|
-
category: {type: Array},
|
17
|
-
description: {type: String},
|
18
|
-
sale: {type: Number},
|
19
|
-
price: {type: Number},
|
20
|
-
coverImage: {type: String},
|
21
|
-
images: {type: Array},
|
22
|
-
popularity: {type: Number},
|
23
|
-
localization: {type: Array},
|
24
|
-
information: [{
|
25
|
-
name: {type: String},
|
26
|
-
value: {type: String}
|
27
|
-
}],
|
28
|
-
// MoySklad
|
29
|
-
quantity: {type: Number},
|
30
|
-
}, {
|
31
|
-
// Creation Date
|
32
|
-
timestamps: { currentTime: () => Date.now() }
|
33
|
-
});
|
34
37
|
|
35
|
-
|
36
|
-
ProductSchema.index({ category: 1 }); // Создаем индекс
|
37
|
-
ProductSchema.index({ price: 1 }); // Создаем индекс
|
38
|
+
const Product = mongoose.model('Product', ProductSchema);
|
38
39
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
module.exports = Product;
|
40
|
+
return Product;
|
41
|
+
}
|
@@ -1,5 +1,15 @@
|
|
1
|
+
// Models
|
2
|
+
import ProductModel from './models/event.model.js';
|
3
|
+
import CategoryModel from './models/ticket.model.js';
|
4
|
+
import ModificationModel from './models/ticket.model.js';
|
5
|
+
import LeftoverModel from './models/ticket.model.js';
|
6
|
+
// Routes
|
1
7
|
import productRoutes from './routes/products.routes.js'
|
8
|
+
import categoriesRoutes from './routes/categories.routes.js'
|
9
|
+
import leftoversRoutes from './routes/leftovers.routes.js'
|
2
10
|
|
3
11
|
export {
|
4
|
-
productRoutes
|
12
|
+
productRoutes,
|
13
|
+
categoriesRoutes,
|
14
|
+
leftoversRoutes
|
5
15
|
}
|