@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.
Files changed (67) hide show
  1. package/dist/Chips-41cd6570.mjs +203 -0
  2. package/dist/Chips-c3d7341e.js +1 -0
  3. package/dist/EULA-e05236af.mjs +4210 -0
  4. package/dist/EULA-f5fba925.js +1 -0
  5. package/dist/Feed-046852fc.js +1 -0
  6. package/dist/Feed-4efa2a93.mjs +394 -0
  7. package/dist/Feed-acfbb839.mjs +371 -0
  8. package/dist/Feed-e6e84388.js +1 -0
  9. package/dist/Image-93c3a270.mjs +480 -0
  10. package/dist/Image-de94b883.js +9 -0
  11. package/dist/Product-1892b14a.js +7 -0
  12. package/dist/Product-d3f1d10a.mjs +844 -0
  13. package/dist/ProductEdit-8e779ed8.js +1 -0
  14. package/dist/ProductEdit-ebcc3f98.mjs +306 -0
  15. package/dist/ProfileBlogposts-8c10a505.js +1 -0
  16. package/dist/ProfileBlogposts-a2f7cd4c.mjs +70 -0
  17. package/dist/ProfileEvents-47409c9e.mjs +62 -0
  18. package/dist/ProfileEvents-db12cf78.js +1 -0
  19. package/dist/auth.server.js +4 -4
  20. package/dist/auth.server.mjs +4 -4
  21. package/dist/community.client.cjs +1 -1
  22. package/dist/community.client.js +217 -241
  23. package/dist/community.server.js +2 -2
  24. package/dist/community.server.mjs +2 -2
  25. package/dist/events.client.cjs +1 -1
  26. package/dist/events.client.js +4 -4
  27. package/dist/events.server.js +361 -224
  28. package/dist/events.server.mjs +361 -224
  29. package/dist/files.server.js +1 -1
  30. package/dist/files.server.mjs +1 -1
  31. package/dist/legal.client.cjs +1 -1
  32. package/dist/legal.client.js +1 -1
  33. package/dist/modules/community/components/sections/Feed.vue.d.ts +2 -0
  34. package/dist/organizations.client-76c3660a.mjs +3072 -0
  35. package/dist/organizations.client-ddbf8809.js +3 -0
  36. package/dist/organizations.client.cjs +1 -1
  37. package/dist/organizations.client.js +4 -4
  38. package/dist/organizations.server.js +4 -4
  39. package/dist/organizations.server.mjs +4 -4
  40. package/dist/style.css +1 -1
  41. package/dist/users.client.cjs +1 -1
  42. package/dist/users.client.js +2 -2
  43. package/dist/users.server.js +2 -2
  44. package/dist/users.server.mjs +2 -2
  45. package/package.json +1 -1
  46. package/src/components/CardHeader/CardHeader.vue +3 -3
  47. package/src/modules/community/components/blocks/CardBlogpost.vue +2 -4
  48. package/src/modules/community/components/sections/Feed.vue +44 -39
  49. package/src/modules/community/components/sections/HotPosts.vue +9 -56
  50. package/src/modules/events/components/blocks/CardEvent.vue +0 -2
  51. package/src/modules/events/controllers/events.controller.js +55 -265
  52. package/src/modules/events/controllers/utils/queryProcessor.js +118 -0
  53. package/src/modules/events/models/event.new.model.js +76 -0
  54. package/src/modules/files/middlewares/server/middlewareMulter.js +1 -0
  55. package/src/modules/globals/controllers/utils/queryProcessor.js +228 -0
  56. package/src/modules/globals/models/common.schema.js +14 -0
  57. package/src/modules/globals/models/engagement.schema.js +10 -0
  58. package/src/modules/globals/models/metadata.schema.js +15 -0
  59. package/src/modules/globals/models/ownership.schema.js +34 -0
  60. package/src/modules/globals/utils/seo-friendly-url.js +28 -0
  61. package/src/modules/legal/components/pages/legal/EULA.vue +0 -3
  62. package/src/modules/products/controllers/categories.controller.js +3 -0
  63. package/src/modules/products/models/category.model.js +63 -13
  64. package/src/modules/products/models/leftover.model.js +38 -17
  65. package/src/modules/products/models/modification.model.js +31 -14
  66. package/src/modules/products/models/product.model.js +37 -38
  67. package/src/modules/products/products.server.js +11 -1
@@ -1,42 +1,41 @@
1
- const mongoose = require('mongoose');
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
- const Modification = require('./modification.model');
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
- ProductSchema.index({ organization: 1 }); // Создаем индекс
36
- ProductSchema.index({ category: 1 }); // Создаем индекс
37
- ProductSchema.index({ price: 1 }); // Создаем индекс
38
+ const Product = mongoose.model('Product', ProductSchema);
38
39
 
39
-
40
- const Product = mongoose.model("Product", ProductSchema);
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
  }