@lyxa.ai/core 1.0.12 → 1.0.13
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/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/libraries/event/index.js.map +1 -1
- package/dist/libraries/mongo/models/activity-log.model.d.ts +11 -0
- package/dist/libraries/mongo/models/activity-log.model.js +44 -0
- package/dist/libraries/mongo/models/activity-log.model.js.map +1 -0
- package/dist/libraries/mongo/models/admin-access-control.model.d.ts +11 -0
- package/dist/libraries/mongo/models/admin-access-control.model.js +55 -0
- package/dist/libraries/mongo/models/admin-access-control.model.js.map +1 -0
- package/dist/libraries/mongo/models/admin.model.d.ts +10 -0
- package/dist/libraries/mongo/models/admin.model.js +48 -0
- package/dist/libraries/mongo/models/admin.model.js.map +1 -0
- package/dist/libraries/mongo/models/app-screen-setting.model.d.ts +11 -0
- package/dist/libraries/mongo/models/app-screen-setting.model.js +48 -0
- package/dist/libraries/mongo/models/app-screen-setting.model.js.map +1 -0
- package/dist/libraries/mongo/models/attribute.model.d.ts +15 -0
- package/dist/libraries/mongo/models/attribute.model.js +65 -0
- package/dist/libraries/mongo/models/attribute.model.js.map +1 -0
- package/dist/libraries/mongo/models/auth-identity.model.d.ts +8 -0
- package/dist/libraries/mongo/models/auth-identity.model.js +33 -0
- package/dist/libraries/mongo/models/auth-identity.model.js.map +1 -0
- package/dist/libraries/mongo/models/banner.model.d.ts +22 -0
- package/dist/libraries/mongo/models/banner.model.js +91 -0
- package/dist/libraries/mongo/models/banner.model.js.map +1 -0
- package/dist/libraries/mongo/models/base/base-coupon.model.d.ts +15 -0
- package/dist/libraries/mongo/models/base/base-coupon.model.js +70 -0
- package/dist/libraries/mongo/models/base/base-coupon.model.js.map +1 -0
- package/dist/libraries/mongo/models/base/base-review.model.d.ts +13 -0
- package/dist/libraries/mongo/models/base/base-review.model.js +55 -0
- package/dist/libraries/mongo/models/base/base-review.model.js.map +1 -0
- package/dist/libraries/mongo/models/bob-finance.model.d.ts +29 -0
- package/dist/libraries/mongo/models/bob-finance.model.js +122 -0
- package/dist/libraries/mongo/models/bob-finance.model.js.map +1 -0
- package/dist/libraries/mongo/models/brand.model.d.ts +7 -0
- package/dist/libraries/mongo/models/brand.model.js +32 -0
- package/dist/libraries/mongo/models/brand.model.js.map +1 -0
- package/dist/libraries/mongo/models/category.model.d.ts +13 -0
- package/dist/libraries/mongo/models/category.model.js +59 -0
- package/dist/libraries/mongo/models/category.model.js.map +1 -0
- package/dist/libraries/mongo/models/counter.model.d.ts +8 -0
- package/dist/libraries/mongo/models/counter.model.js +33 -0
- package/dist/libraries/mongo/models/counter.model.js.map +1 -0
- package/dist/libraries/mongo/models/coupon.model.d.ts +9 -0
- package/dist/libraries/mongo/models/coupon.model.js +38 -0
- package/dist/libraries/mongo/models/coupon.model.js.map +1 -0
- package/dist/libraries/mongo/models/deal-setting.model.d.ts +12 -0
- package/dist/libraries/mongo/models/deal-setting.model.js +53 -0
- package/dist/libraries/mongo/models/deal-setting.model.js.map +1 -0
- package/dist/libraries/mongo/models/dish.model.d.ts +19 -0
- package/dist/libraries/mongo/models/dish.model.js +84 -0
- package/dist/libraries/mongo/models/dish.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/attribute-item.model.d.ts +5 -0
- package/dist/libraries/mongo/models/embedded/attribute-item.model.js +32 -0
- package/dist/libraries/mongo/models/embedded/attribute-item.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/attribute-map.model.d.ts +7 -0
- package/dist/libraries/mongo/models/embedded/attribute-map.model.js +29 -0
- package/dist/libraries/mongo/models/embedded/attribute-map.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/business-development-setting.model.d.ts +4 -0
- package/dist/libraries/mongo/models/embedded/business-development-setting.model.js +27 -0
- package/dist/libraries/mongo/models/embedded/business-development-setting.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/charge-setting.model.d.ts +14 -0
- package/dist/libraries/mongo/models/embedded/charge-setting.model.js +60 -0
- package/dist/libraries/mongo/models/embedded/charge-setting.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/charge.model.d.ts +5 -0
- package/dist/libraries/mongo/models/embedded/charge.model.js +28 -0
- package/dist/libraries/mongo/models/embedded/charge.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/courier-setting.model.d.ts +4 -0
- package/dist/libraries/mongo/models/embedded/courier-setting.model.js +27 -0
- package/dist/libraries/mongo/models/embedded/courier-setting.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/currency-setting.model.d.ts +7 -0
- package/dist/libraries/mongo/models/embedded/currency-setting.model.js +38 -0
- package/dist/libraries/mongo/models/embedded/currency-setting.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/currency.model.d.ts +10 -0
- package/dist/libraries/mongo/models/embedded/currency.model.js +57 -0
- package/dist/libraries/mongo/models/embedded/currency.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/featured-item.mode.d.ts +6 -0
- package/dist/libraries/mongo/models/embedded/featured-item.mode.js +33 -0
- package/dist/libraries/mongo/models/embedded/featured-item.mode.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/otp-fields.model.d.ts +5 -0
- package/dist/libraries/mongo/models/embedded/otp-fields.model.js +32 -0
- package/dist/libraries/mongo/models/embedded/otp-fields.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/package.model.d.ts +25 -0
- package/dist/libraries/mongo/models/embedded/package.model.js +86 -0
- package/dist/libraries/mongo/models/embedded/package.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/parent-document.model.d.ts +5 -0
- package/dist/libraries/mongo/models/embedded/parent-document.model.js +32 -0
- package/dist/libraries/mongo/models/embedded/parent-document.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/payout-setting.model.d.ts +5 -0
- package/dist/libraries/mongo/models/embedded/payout-setting.model.js +28 -0
- package/dist/libraries/mongo/models/embedded/payout-setting.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/price.model.d.ts +5 -0
- package/dist/libraries/mongo/models/embedded/price.model.js +32 -0
- package/dist/libraries/mongo/models/embedded/price.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/product-nutrition.model.d.ts +5 -0
- package/dist/libraries/mongo/models/embedded/product-nutrition.model.js +32 -0
- package/dist/libraries/mongo/models/embedded/product-nutrition.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/referral-discount-config.model.d.ts +6 -0
- package/dist/libraries/mongo/models/embedded/referral-discount-config.model.js +38 -0
- package/dist/libraries/mongo/models/embedded/referral-discount-config.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/rider-setting.model.d.ts +6 -0
- package/dist/libraries/mongo/models/embedded/rider-setting.model.js +37 -0
- package/dist/libraries/mongo/models/embedded/rider-setting.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/service-fee-setting.model.d.ts +5 -0
- package/dist/libraries/mongo/models/embedded/service-fee-setting.model.js +28 -0
- package/dist/libraries/mongo/models/embedded/service-fee-setting.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/shop-document.model.d.ts +5 -0
- package/dist/libraries/mongo/models/embedded/shop-document.model.js +32 -0
- package/dist/libraries/mongo/models/embedded/shop-document.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/subscription-summary.model.d.ts +8 -0
- package/dist/libraries/mongo/models/embedded/subscription-summary.model.js +47 -0
- package/dist/libraries/mongo/models/embedded/subscription-summary.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/zone-geometry.mode.d.ts +4 -0
- package/dist/libraries/mongo/models/embedded/zone-geometry.mode.js +27 -0
- package/dist/libraries/mongo/models/embedded/zone-geometry.mode.js.map +1 -0
- package/dist/libraries/mongo/models/faq.model.d.ts +12 -0
- package/dist/libraries/mongo/models/faq.model.js +53 -0
- package/dist/libraries/mongo/models/faq.model.js.map +1 -0
- package/dist/libraries/mongo/models/favourite.model.d.ts +13 -0
- package/dist/libraries/mongo/models/favourite.model.js +46 -0
- package/dist/libraries/mongo/models/favourite.model.js.map +1 -0
- package/dist/libraries/mongo/models/featured-setting.model.d.ts +9 -0
- package/dist/libraries/mongo/models/featured-setting.model.js +34 -0
- package/dist/libraries/mongo/models/featured-setting.model.js.map +1 -0
- package/dist/libraries/mongo/models/filter-container.model.d.ts +11 -0
- package/dist/libraries/mongo/models/filter-container.model.js +53 -0
- package/dist/libraries/mongo/models/filter-container.model.js.map +1 -0
- package/dist/libraries/mongo/models/list-container.model.d.ts +17 -0
- package/dist/libraries/mongo/models/list-container.model.js +70 -0
- package/dist/libraries/mongo/models/list-container.model.js.map +1 -0
- package/dist/libraries/mongo/models/loyalty-point-category.model.d.ts +9 -0
- package/dist/libraries/mongo/models/loyalty-point-category.model.js +38 -0
- package/dist/libraries/mongo/models/loyalty-point-category.model.js.map +1 -0
- package/dist/libraries/mongo/models/loyalty-point-setting.model.d.ts +9 -0
- package/dist/libraries/mongo/models/loyalty-point-setting.model.js +42 -0
- package/dist/libraries/mongo/models/loyalty-point-setting.model.js.map +1 -0
- package/dist/libraries/mongo/models/marketing.model.d.ts +14 -0
- package/dist/libraries/mongo/models/marketing.model.js +55 -0
- package/dist/libraries/mongo/models/marketing.model.js.map +1 -0
- package/dist/libraries/mongo/models/meal-plan.model.d.ts +11 -0
- package/dist/libraries/mongo/models/meal-plan.model.js +52 -0
- package/dist/libraries/mongo/models/meal-plan.model.js.map +1 -0
- package/dist/libraries/mongo/models/notification.model.d.ts +40 -0
- package/dist/libraries/mongo/models/notification.model.js +155 -0
- package/dist/libraries/mongo/models/notification.model.js.map +1 -0
- package/dist/libraries/mongo/models/nutrition.model.d.ts +8 -0
- package/dist/libraries/mongo/models/nutrition.model.js +33 -0
- package/dist/libraries/mongo/models/nutrition.model.js.map +1 -0
- package/dist/libraries/mongo/models/order.model.d.ts +2 -0
- package/dist/libraries/mongo/models/order.model.js +7 -0
- package/dist/libraries/mongo/models/order.model.js.map +1 -0
- package/dist/libraries/mongo/models/parent.model.d.ts +21 -0
- package/dist/libraries/mongo/models/parent.model.js +83 -0
- package/dist/libraries/mongo/models/parent.model.js.map +1 -0
- package/dist/libraries/mongo/models/payout.model.d.ts +2 -0
- package/dist/libraries/mongo/models/payout.model.js +7 -0
- package/dist/libraries/mongo/models/payout.model.js.map +1 -0
- package/dist/libraries/mongo/models/product-marketing.model.d.ts +13 -0
- package/dist/libraries/mongo/models/product-marketing.model.js +50 -0
- package/dist/libraries/mongo/models/product-marketing.model.js.map +1 -0
- package/dist/libraries/mongo/models/product.model.d.ts +21 -0
- package/dist/libraries/mongo/models/product.model.js +95 -0
- package/dist/libraries/mongo/models/product.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/apple-auth-identity.model.d.ts +6 -0
- package/dist/libraries/mongo/models/providers/apple-auth-identity.model.js +25 -0
- package/dist/libraries/mongo/models/providers/apple-auth-identity.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/buy1-get1-marketing.model.d.ts +12 -0
- package/dist/libraries/mongo/models/providers/buy1-get1-marketing.model.js +42 -0
- package/dist/libraries/mongo/models/providers/buy1-get1-marketing.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/custom-coupon.model.d.ts +12 -0
- package/dist/libraries/mongo/models/providers/custom-coupon.model.js +39 -0
- package/dist/libraries/mongo/models/providers/custom-coupon.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/discount-marketing.model.d.ts +15 -0
- package/dist/libraries/mongo/models/providers/discount-marketing.model.js +57 -0
- package/dist/libraries/mongo/models/providers/discount-marketing.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/email-auth-identity.model.d.ts +9 -0
- package/dist/libraries/mongo/models/providers/email-auth-identity.model.js +36 -0
- package/dist/libraries/mongo/models/providers/email-auth-identity.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/featured-marketing.model.d.ts +8 -0
- package/dist/libraries/mongo/models/providers/featured-marketing.model.js +26 -0
- package/dist/libraries/mongo/models/providers/featured-marketing.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/free-delivery-marketing.model.d.ts +8 -0
- package/dist/libraries/mongo/models/providers/free-delivery-marketing.model.js +26 -0
- package/dist/libraries/mongo/models/providers/free-delivery-marketing.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/global-coupon.model.d.ts +7 -0
- package/dist/libraries/mongo/models/providers/global-coupon.model.js +13 -0
- package/dist/libraries/mongo/models/providers/global-coupon.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/google-auth-identity.model.d.ts +6 -0
- package/dist/libraries/mongo/models/providers/google-auth-identity.model.js +25 -0
- package/dist/libraries/mongo/models/providers/google-auth-identity.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/individual-store-coupon.model.d.ts +11 -0
- package/dist/libraries/mongo/models/providers/individual-store-coupon.model.js +38 -0
- package/dist/libraries/mongo/models/providers/individual-store-coupon.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/individual-user-coupon.model.d.ts +12 -0
- package/dist/libraries/mongo/models/providers/individual-user-coupon.model.js +39 -0
- package/dist/libraries/mongo/models/providers/individual-user-coupon.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/loyalty-point-marketing.model.d.ts +15 -0
- package/dist/libraries/mongo/models/providers/loyalty-point-marketing.model.js +53 -0
- package/dist/libraries/mongo/models/providers/loyalty-point-marketing.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/phone-auth-identity.model.d.ts +8 -0
- package/dist/libraries/mongo/models/providers/phone-auth-identity.model.js +31 -0
- package/dist/libraries/mongo/models/providers/phone-auth-identity.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/punch-marketing.model.d.ts +13 -0
- package/dist/libraries/mongo/models/providers/punch-marketing.model.js +51 -0
- package/dist/libraries/mongo/models/providers/punch-marketing.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/referral-code-coupon.mode.d.ts +10 -0
- package/dist/libraries/mongo/models/providers/referral-code-coupon.mode.js +28 -0
- package/dist/libraries/mongo/models/providers/referral-code-coupon.mode.js.map +1 -0
- package/dist/libraries/mongo/models/providers/referral-reward-coupon.model.d.ts +12 -0
- package/dist/libraries/mongo/models/providers/referral-reward-coupon.model.js +39 -0
- package/dist/libraries/mongo/models/providers/referral-reward-coupon.model.js.map +1 -0
- package/dist/libraries/mongo/models/punch-marketing-history.model.d.ts +11 -0
- package/dist/libraries/mongo/models/punch-marketing-history.model.js +44 -0
- package/dist/libraries/mongo/models/punch-marketing-history.model.js.map +1 -0
- package/dist/libraries/mongo/models/rating-setting.model.d.ts +9 -0
- package/dist/libraries/mongo/models/rating-setting.model.js +38 -0
- package/dist/libraries/mongo/models/rating-setting.model.js.map +1 -0
- package/dist/libraries/mongo/models/referral-setting.model.d.ts +8 -0
- package/dist/libraries/mongo/models/referral-setting.model.js +33 -0
- package/dist/libraries/mongo/models/referral-setting.model.js.map +1 -0
- package/dist/libraries/mongo/models/request-area.model copy.d.ts +9 -0
- package/dist/libraries/mongo/models/request-area.model copy.js +34 -0
- package/dist/libraries/mongo/models/request-area.model copy.js.map +1 -0
- package/dist/libraries/mongo/models/request-area.model.d.ts +9 -0
- package/dist/libraries/mongo/models/request-area.model.js +34 -0
- package/dist/libraries/mongo/models/request-area.model.js.map +1 -0
- package/dist/libraries/mongo/models/rider-review.d.ts +7 -0
- package/dist/libraries/mongo/models/rider-review.js +28 -0
- package/dist/libraries/mongo/models/rider-review.js.map +1 -0
- package/dist/libraries/mongo/models/rider-review.model.d.ts +7 -0
- package/dist/libraries/mongo/models/rider-review.model.js +28 -0
- package/dist/libraries/mongo/models/rider-review.model.js.map +1 -0
- package/dist/libraries/mongo/models/rider.model.d.ts +2 -0
- package/dist/libraries/mongo/models/rider.model.js +7 -0
- package/dist/libraries/mongo/models/rider.model.js.map +1 -0
- package/dist/libraries/mongo/models/role.model.ts.d.ts +8 -0
- package/dist/libraries/mongo/models/role.model.ts.js +37 -0
- package/dist/libraries/mongo/models/role.model.ts.js.map +1 -0
- package/dist/libraries/mongo/models/setting.model.d.ts +31 -0
- package/dist/libraries/mongo/models/setting.model.js +116 -0
- package/dist/libraries/mongo/models/setting.model.js.map +1 -0
- package/dist/libraries/mongo/models/{address.model.d.ts → shared/address.model.d.ts} +1 -1
- package/dist/libraries/mongo/models/{address.model.js → shared/address.model.js} +1 -1
- package/dist/libraries/mongo/models/shared/address.model.js.map +1 -0
- package/dist/libraries/mongo/models/shared/duration.model.js.map +1 -0
- package/dist/libraries/mongo/models/{work-hour.model.d.ts → shared/work-hour.model.d.ts} +1 -1
- package/dist/libraries/mongo/models/{work-hour.model.js → shared/work-hour.model.js} +1 -1
- package/dist/libraries/mongo/models/shared/work-hour.model.js.map +1 -0
- package/dist/libraries/mongo/models/shop-access-control.model.d.ts +13 -0
- package/dist/libraries/mongo/models/shop-access-control.model.js +61 -0
- package/dist/libraries/mongo/models/shop-access-control.model.js.map +1 -0
- package/dist/libraries/mongo/models/shop-category.model.d.ts +12 -0
- package/dist/libraries/mongo/models/shop-category.model.js +45 -0
- package/dist/libraries/mongo/models/shop-category.model.js.map +1 -0
- package/dist/libraries/mongo/models/shop-meal-plan.model.d.ts +13 -0
- package/dist/libraries/mongo/models/shop-meal-plan.model.js +46 -0
- package/dist/libraries/mongo/models/shop-meal-plan.model.js.map +1 -0
- package/dist/libraries/mongo/models/shop-product.model.d.ts +26 -0
- package/dist/libraries/mongo/models/shop-product.model.js +103 -0
- package/dist/libraries/mongo/models/shop-product.model.js.map +1 -0
- package/dist/libraries/mongo/models/shop-review.d.ts +7 -0
- package/dist/libraries/mongo/models/shop-review.js +28 -0
- package/dist/libraries/mongo/models/shop-review.js.map +1 -0
- package/dist/libraries/mongo/models/shop.model.d.ts +50 -0
- package/dist/libraries/mongo/models/shop.model.js +215 -0
- package/dist/libraries/mongo/models/shop.model.js.map +1 -0
- package/dist/libraries/mongo/models/subscription-setting.model.d.ts +9 -0
- package/dist/libraries/mongo/models/subscription-setting.model.js +38 -0
- package/dist/libraries/mongo/models/subscription-setting.model.js.map +1 -0
- package/dist/libraries/mongo/models/subscription.model.d.ts +23 -0
- package/dist/libraries/mongo/models/subscription.model.js +92 -0
- package/dist/libraries/mongo/models/subscription.model.js.map +1 -0
- package/dist/libraries/mongo/models/tag.model.d.ts +11 -0
- package/dist/libraries/mongo/models/tag.model.js +52 -0
- package/dist/libraries/mongo/models/tag.model.js.map +1 -0
- package/dist/libraries/mongo/models/transaction.model.d.ts +2 -0
- package/dist/libraries/mongo/models/transaction.model.js +7 -0
- package/dist/libraries/mongo/models/transaction.model.js.map +1 -0
- package/dist/libraries/mongo/models/user.model.d.ts +16 -0
- package/dist/libraries/mongo/models/user.model.js +73 -0
- package/dist/libraries/mongo/models/user.model.js.map +1 -0
- package/dist/libraries/mongo/models/zone.d.ts +15 -0
- package/dist/libraries/mongo/models/zone.js +64 -0
- package/dist/libraries/mongo/models/zone.js.map +1 -0
- package/dist/libraries/mongo/models/zone.model..d.ts +15 -0
- package/dist/libraries/mongo/models/zone.model..js +64 -0
- package/dist/libraries/mongo/models/zone.model..js.map +1 -0
- package/dist/utilities/enum.d.ts +208 -0
- package/dist/utilities/enum.js +240 -1
- package/dist/utilities/enum.js.map +1 -1
- package/dist/utilities/validation/common-validation.d.ts +1 -1
- package/dist/utilities/validation/common-validation.js +2 -2
- package/dist/utilities/validation/common-validation.js.map +1 -1
- package/dist/utilities/validation/global-validation.d.ts +3 -1
- package/dist/utilities/validation/global-validation.js +9 -5
- package/dist/utilities/validation/global-validation.js.map +1 -1
- package/package.json +2 -1
- package/dist/libraries/mongo/models/address.model.js.map +0 -1
- package/dist/libraries/mongo/models/duration.model.js.map +0 -1
- package/dist/libraries/mongo/models/work-hour.model.js.map +0 -1
- /package/dist/libraries/mongo/models/{duration.model.d.ts → shared/duration.model.d.ts} +0 -0
- /package/dist/libraries/mongo/models/{duration.model.js → shared/duration.model.js} +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { mongoose, Ref, ReturnModelType } from '@typegoose/typegoose';
|
|
2
|
+
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
3
|
+
import { ClickType, NotificationAccountType } from '../../../utilities/enum';
|
|
4
|
+
import { User } from './user.model';
|
|
5
|
+
import { Parent } from './parent.model';
|
|
6
|
+
import { Shop } from './shop.model';
|
|
7
|
+
import { Admin } from './admin.model';
|
|
8
|
+
import { Product } from './product.model';
|
|
9
|
+
import { Rider } from './rider.model';
|
|
10
|
+
import { Order } from './order.model';
|
|
11
|
+
import { ListContainer } from './list-container.model';
|
|
12
|
+
import { Payout } from './payout.model';
|
|
13
|
+
import { BOBFinance } from './bob-finance.model';
|
|
14
|
+
import { RequestArea } from './request-area.model';
|
|
15
|
+
export declare class Notification extends TimeStamps {
|
|
16
|
+
title: string;
|
|
17
|
+
body: string;
|
|
18
|
+
image?: string;
|
|
19
|
+
sound?: string;
|
|
20
|
+
accountType: NotificationAccountType;
|
|
21
|
+
isGlobal?: boolean;
|
|
22
|
+
users?: Ref<User>[];
|
|
23
|
+
parents?: Ref<Parent>[];
|
|
24
|
+
shops?: Ref<Shop>[];
|
|
25
|
+
riders?: Ref<Rider>[];
|
|
26
|
+
admins?: Ref<Admin>[];
|
|
27
|
+
isClickable?: boolean;
|
|
28
|
+
clickType?: ClickType;
|
|
29
|
+
clickableUrl?: string;
|
|
30
|
+
clickableOrder?: Ref<Order>;
|
|
31
|
+
clickableShop?: Ref<Shop>;
|
|
32
|
+
clickableProduct?: Ref<Product>;
|
|
33
|
+
clickableListContainer?: Ref<ListContainer>;
|
|
34
|
+
clickablePayout?: Ref<Payout>;
|
|
35
|
+
clickableBOBFinance?: Ref<BOBFinance>;
|
|
36
|
+
clickableRequestArea?: Ref<RequestArea>;
|
|
37
|
+
isSendByAdmin?: boolean;
|
|
38
|
+
seenBy?: mongoose.Types.ObjectId[];
|
|
39
|
+
}
|
|
40
|
+
export declare const NotificationModel: ReturnModelType<typeof Notification>;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.NotificationModel = exports.Notification = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
15
|
+
const enum_1 = require("../../../utilities/enum");
|
|
16
|
+
const user_model_1 = require("./user.model");
|
|
17
|
+
const parent_model_1 = require("./parent.model");
|
|
18
|
+
const shop_model_1 = require("./shop.model");
|
|
19
|
+
const admin_model_1 = require("./admin.model");
|
|
20
|
+
const product_model_1 = require("./product.model");
|
|
21
|
+
const rider_model_1 = require("./rider.model");
|
|
22
|
+
const order_model_1 = require("./order.model");
|
|
23
|
+
const list_container_model_1 = require("./list-container.model");
|
|
24
|
+
const payout_model_1 = require("./payout.model");
|
|
25
|
+
const bob_finance_model_1 = require("./bob-finance.model");
|
|
26
|
+
const request_area_model_1 = require("./request-area.model");
|
|
27
|
+
let Notification = class Notification extends defaultClasses_1.TimeStamps {
|
|
28
|
+
title;
|
|
29
|
+
body;
|
|
30
|
+
image;
|
|
31
|
+
sound;
|
|
32
|
+
accountType;
|
|
33
|
+
isGlobal;
|
|
34
|
+
users;
|
|
35
|
+
parents;
|
|
36
|
+
shops;
|
|
37
|
+
riders;
|
|
38
|
+
admins;
|
|
39
|
+
isClickable;
|
|
40
|
+
clickType;
|
|
41
|
+
clickableUrl;
|
|
42
|
+
clickableOrder;
|
|
43
|
+
clickableShop;
|
|
44
|
+
clickableProduct;
|
|
45
|
+
clickableListContainer;
|
|
46
|
+
clickablePayout;
|
|
47
|
+
clickableBOBFinance;
|
|
48
|
+
clickableRequestArea;
|
|
49
|
+
isSendByAdmin;
|
|
50
|
+
seenBy;
|
|
51
|
+
};
|
|
52
|
+
exports.Notification = Notification;
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], Notification.prototype, "title", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], Notification.prototype, "body", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typegoose_1.prop)({ type: String }),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], Notification.prototype, "image", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typegoose_1.prop)({ type: String }),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], Notification.prototype, "sound", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.NotificationAccountType }),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], Notification.prototype, "accountType", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
75
|
+
__metadata("design:type", Boolean)
|
|
76
|
+
], Notification.prototype, "isGlobal", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typegoose_1.prop)({ ref: () => user_model_1.User, default: [] }),
|
|
79
|
+
__metadata("design:type", Array)
|
|
80
|
+
], Notification.prototype, "users", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typegoose_1.prop)({ ref: () => parent_model_1.Parent, default: [] }),
|
|
83
|
+
__metadata("design:type", Array)
|
|
84
|
+
], Notification.prototype, "parents", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typegoose_1.prop)({ ref: () => shop_model_1.Shop, default: [] }),
|
|
87
|
+
__metadata("design:type", Array)
|
|
88
|
+
], Notification.prototype, "shops", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, typegoose_1.prop)({ ref: () => rider_model_1.Rider, default: [] }),
|
|
91
|
+
__metadata("design:type", Array)
|
|
92
|
+
], Notification.prototype, "riders", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, typegoose_1.prop)({ ref: () => admin_model_1.Admin, default: [] }),
|
|
95
|
+
__metadata("design:type", Array)
|
|
96
|
+
], Notification.prototype, "admins", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
99
|
+
__metadata("design:type", Boolean)
|
|
100
|
+
], Notification.prototype, "isClickable", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, typegoose_1.prop)({ type: String, enum: enum_1.ClickType }),
|
|
103
|
+
__metadata("design:type", String)
|
|
104
|
+
], Notification.prototype, "clickType", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, typegoose_1.prop)({ type: String, trim: true }),
|
|
107
|
+
__metadata("design:type", String)
|
|
108
|
+
], Notification.prototype, "clickableUrl", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, typegoose_1.prop)({ ref: () => order_model_1.Order }),
|
|
111
|
+
__metadata("design:type", Object)
|
|
112
|
+
], Notification.prototype, "clickableOrder", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, typegoose_1.prop)({ ref: () => shop_model_1.Shop }),
|
|
115
|
+
__metadata("design:type", Object)
|
|
116
|
+
], Notification.prototype, "clickableShop", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, typegoose_1.prop)({ ref: () => product_model_1.Product }),
|
|
119
|
+
__metadata("design:type", Object)
|
|
120
|
+
], Notification.prototype, "clickableProduct", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, typegoose_1.prop)({ ref: () => list_container_model_1.ListContainer }),
|
|
123
|
+
__metadata("design:type", Object)
|
|
124
|
+
], Notification.prototype, "clickableListContainer", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, typegoose_1.prop)({ ref: () => payout_model_1.Payout }),
|
|
127
|
+
__metadata("design:type", Object)
|
|
128
|
+
], Notification.prototype, "clickablePayout", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
(0, typegoose_1.prop)({ ref: () => bob_finance_model_1.BOBFinance }),
|
|
131
|
+
__metadata("design:type", Object)
|
|
132
|
+
], Notification.prototype, "clickableBOBFinance", void 0);
|
|
133
|
+
__decorate([
|
|
134
|
+
(0, typegoose_1.prop)({ ref: () => request_area_model_1.RequestArea }),
|
|
135
|
+
__metadata("design:type", Object)
|
|
136
|
+
], Notification.prototype, "clickableRequestArea", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
(0, typegoose_1.prop)({ type: Boolean, default: false }),
|
|
139
|
+
__metadata("design:type", Boolean)
|
|
140
|
+
], Notification.prototype, "isSendByAdmin", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
(0, typegoose_1.prop)({ type: () => [typegoose_1.mongoose.Types.ObjectId], default: [] }),
|
|
143
|
+
__metadata("design:type", Array)
|
|
144
|
+
], Notification.prototype, "seenBy", void 0);
|
|
145
|
+
exports.Notification = Notification = __decorate([
|
|
146
|
+
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'notifications' } }),
|
|
147
|
+
(0, typegoose_1.index)({ users: 1, accountType: 1, createdAt: 1 }),
|
|
148
|
+
(0, typegoose_1.index)({ shops: 1, accountType: 1, createdAt: 1 }),
|
|
149
|
+
(0, typegoose_1.index)({ riders: 1, accountType: 1, createdAt: 1 }),
|
|
150
|
+
(0, typegoose_1.index)({ admins: 1, accountType: 1, createdAt: 1 }),
|
|
151
|
+
(0, typegoose_1.index)({ parents: 1, accountType: 1, createdAt: 1 }),
|
|
152
|
+
(0, typegoose_1.index)({ accountType: 1, type: 1, createdAt: 1 })
|
|
153
|
+
], Notification);
|
|
154
|
+
exports.NotificationModel = (0, typegoose_1.getModelForClass)(Notification);
|
|
155
|
+
//# sourceMappingURL=notification.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.model.js","sourceRoot":"/","sources":["libraries/mongo/models/notification.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAQ8B;AAC9B,4EAAqE;AACrE,kDAA6E;AAC7E,6CAAoC;AACpC,iDAAwC;AACxC,6CAAoC;AACpC,+CAAsC;AACtC,mDAA0C;AAC1C,+CAAsC;AACtC,+CAAsC;AACtC,iEAAuD;AACvD,iDAAwC;AACxC,2DAAiD;AACjD,6DAAmD;AAS5C,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,2BAAU;IAEpC,KAAK,CAAU;IAGf,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,KAAK,CAAU;IAGf,WAAW,CAA2B;IAGtC,QAAQ,CAAW;IAGnB,KAAK,CAAe;IAGpB,OAAO,CAAiB;IAGxB,KAAK,CAAe;IAGpB,MAAM,CAAgB;IAGtB,MAAM,CAAgB;IAGtB,WAAW,CAAW;IAGtB,SAAS,CAAa;IAGtB,YAAY,CAAU;IAGtB,cAAc,CAAc;IAG5B,aAAa,CAAa;IAG1B,gBAAgB,CAAgB;IAGhC,sBAAsB,CAAsB;IAG5C,eAAe,CAAe;IAG9B,mBAAmB,CAAmB;IAGtC,oBAAoB,CAAoB;IAGxC,aAAa,CAAW;IAGxB,MAAM,CAA6B;CAC1C,CAAA;AArEY,oCAAY;AAEjB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;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SAAS,EAAE,CAAC,EAAE,CAAC;IACjD,IAAA,iBAAK,EAAC,EAAE,KAAK,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACjD,IAAA,iBAAK,EAAC,EAAE,MAAM,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IAClD,IAAA,iBAAK,EAAC,EAAE,MAAM,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IAClD,IAAA,iBAAK,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACnD,IAAA,iBAAK,EAAC,EAAE,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;GACpC,YAAY,CAqExB;AAEY,QAAA,iBAAiB,GAAyC,IAAA,4BAAgB,EAAC,YAAY,CAAC,CAAC","sourcesContent":["import {\r\n\tgetModelForClass,\r\n\tindex,\r\n\tmodelOptions,\r\n\tmongoose,\r\n\tprop,\r\n\tRef,\r\n\tReturnModelType,\r\n} from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { ClickType, NotificationAccountType } from '../../../utilities/enum';\r\nimport { User } from './user.model';\r\nimport { Parent } from './parent.model';\r\nimport { Shop } from './shop.model';\r\nimport { Admin } from './admin.model';\r\nimport { Product } from './product.model';\r\nimport { Rider } from './rider.model';\r\nimport { Order } from './order.model';\r\nimport { ListContainer } from './list-container.model';\r\nimport { Payout } from './payout.model';\r\nimport { BOBFinance } from './bob-finance.model';\r\nimport { RequestArea } from './request-area.model';\r\n\r\n@modelOptions({ schemaOptions: { collection: 'notifications' } })\r\n@index({ users: 1, accountType: 1, createdAt: 1 })\r\n@index({ shops: 1, accountType: 1, createdAt: 1 })\r\n@index({ riders: 1, accountType: 1, createdAt: 1 })\r\n@index({ admins: 1, accountType: 1, createdAt: 1 })\r\n@index({ parents: 1, accountType: 1, createdAt: 1 })\r\n@index({ accountType: 1, type: 1, createdAt: 1 })\r\nexport class Notification extends TimeStamps {\r\n\t@prop({ required: true, type: String })\r\n\tpublic title!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic body!: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic image?: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic sound?: string;\r\n\r\n\t@prop({ required: true, type: String, enum: NotificationAccountType })\r\n\tpublic accountType!: NotificationAccountType;\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isGlobal?: boolean;\r\n\r\n\t@prop({ ref: () => User, default: [] })\r\n\tpublic users?: Ref<User>[];\r\n\r\n\t@prop({ ref: () => Parent, default: [] })\r\n\tpublic parents?: Ref<Parent>[];\r\n\r\n\t@prop({ ref: () => Shop, default: [] })\r\n\tpublic shops?: Ref<Shop>[];\r\n\r\n\t@prop({ ref: () => Rider, default: [] })\r\n\tpublic riders?: Ref<Rider>[];\r\n\r\n\t@prop({ ref: () => Admin, default: [] })\r\n\tpublic admins?: Ref<Admin>[];\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isClickable?: boolean;\r\n\r\n\t@prop({ type: String, enum: ClickType })\r\n\tpublic clickType?: ClickType;\r\n\r\n\t@prop({ type: String, trim: true })\r\n\tpublic clickableUrl?: string;\r\n\r\n\t@prop({ ref: () => Order })\r\n\tpublic clickableOrder?: Ref<Order>;\r\n\r\n\t@prop({ ref: () => Shop })\r\n\tpublic clickableShop?: Ref<Shop>;\r\n\r\n\t@prop({ ref: () => Product })\r\n\tpublic clickableProduct?: Ref<Product>;\r\n\r\n\t@prop({ ref: () => ListContainer })\r\n\tpublic clickableListContainer?: Ref<ListContainer>;\r\n\r\n\t@prop({ ref: () => Payout })\r\n\tpublic clickablePayout?: Ref<Payout>;\r\n\r\n\t@prop({ ref: () => BOBFinance })\r\n\tpublic clickableBOBFinance?: Ref<BOBFinance>;\r\n\r\n\t@prop({ ref: () => RequestArea })\r\n\tpublic clickableRequestArea?: Ref<RequestArea>;\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isSendByAdmin?: boolean;\r\n\r\n\t@prop({ type: () => [mongoose.Types.ObjectId], default: [] })\r\n\tpublic seenBy?: mongoose.Types.ObjectId[];\r\n}\r\n\r\nexport const NotificationModel: ReturnModelType<typeof Notification> = getModelForClass(Notification);\r\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReturnModelType } from '@typegoose/typegoose';
|
|
2
|
+
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
3
|
+
import { Status } from '../../../utilities/enum';
|
|
4
|
+
export declare class Nutrition extends TimeStamps {
|
|
5
|
+
name: string;
|
|
6
|
+
status?: Status;
|
|
7
|
+
}
|
|
8
|
+
export declare const NutritionModel: ReturnModelType<typeof Nutrition>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.NutritionModel = exports.Nutrition = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
15
|
+
const enum_1 = require("../../../utilities/enum");
|
|
16
|
+
let Nutrition = class Nutrition extends defaultClasses_1.TimeStamps {
|
|
17
|
+
name;
|
|
18
|
+
status;
|
|
19
|
+
};
|
|
20
|
+
exports.Nutrition = Nutrition;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], Nutrition.prototype, "name", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typegoose_1.prop)({ type: String, enum: enum_1.Status, default: enum_1.Status.ACTIVE }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], Nutrition.prototype, "status", void 0);
|
|
29
|
+
exports.Nutrition = Nutrition = __decorate([
|
|
30
|
+
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'nutritions' } })
|
|
31
|
+
], Nutrition);
|
|
32
|
+
exports.NutritionModel = (0, typegoose_1.getModelForClass)(Nutrition);
|
|
33
|
+
//# sourceMappingURL=nutrition.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nutrition.model.js","sourceRoot":"/","sources":["libraries/mongo/models/nutrition.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA6F;AAC7F,4EAAqE;AACrE,kDAAiD;AAG1C,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,2BAAU;IAEjC,IAAI,CAAU;IAGd,MAAM,CAAU;CACvB,CAAA;AANY,8BAAS;AAEd;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uCAClB;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAM,EAAE,OAAO,EAAE,aAAM,CAAC,MAAM,EAAE,CAAC;;yCACtC;oBALX,SAAS;IADrB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,EAAE,CAAC;GACjD,SAAS,CAMrB;AAEY,QAAA,cAAc,GAAsC,IAAA,4BAAgB,EAAC,SAAS,CAAC,CAAC","sourcesContent":["import { getModelForClass, modelOptions, prop, ReturnModelType } from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { Status } from '../../../utilities/enum';\r\n\r\n@modelOptions({ schemaOptions: { collection: 'nutritions' } })\r\nexport class Nutrition extends TimeStamps {\r\n\t@prop({ required: true, type: String })\r\n\tpublic name!: string;\r\n\r\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\r\n\tpublic status?: Status;\r\n}\r\n\r\nexport const NutritionModel: ReturnModelType<typeof Nutrition> = getModelForClass(Nutrition);\r\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order.model.js","sourceRoot":"/","sources":["libraries/mongo/models/order.model.ts"],"names":[],"mappings":";;;AAAA,MAAa,KAAK;CAAG;AAArB,sBAAqB","sourcesContent":["export class Order {}\r\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReturnModelType, Ref } from '@typegoose/typegoose';
|
|
2
|
+
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
3
|
+
import { Address } from './shared/address.model';
|
|
4
|
+
import { ItemType } from '../../../utilities/enum';
|
|
5
|
+
import { Charge } from './embedded/charge.model';
|
|
6
|
+
import { Admin } from './admin.model';
|
|
7
|
+
import { ParentDocument } from './embedded/parent-document.model';
|
|
8
|
+
export declare class Parent extends TimeStamps {
|
|
9
|
+
name: string;
|
|
10
|
+
phoneNumber: string;
|
|
11
|
+
address: Address;
|
|
12
|
+
chargeType: string;
|
|
13
|
+
charge?: Charge;
|
|
14
|
+
itemType: ItemType;
|
|
15
|
+
isServiceFeeCharged: boolean;
|
|
16
|
+
businessDevExecutive?: Ref<Admin>;
|
|
17
|
+
status?: string;
|
|
18
|
+
profilePhoto: string;
|
|
19
|
+
document: ParentDocument;
|
|
20
|
+
}
|
|
21
|
+
export declare const ParentModel: ReturnModelType<typeof Parent>;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ParentModel = exports.Parent = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
15
|
+
const address_model_1 = require("./shared/address.model");
|
|
16
|
+
const enum_1 = require("../../../utilities/enum");
|
|
17
|
+
const charge_model_1 = require("./embedded/charge.model");
|
|
18
|
+
const admin_model_1 = require("./admin.model");
|
|
19
|
+
const parent_document_model_1 = require("./embedded/parent-document.model");
|
|
20
|
+
let Parent = class Parent extends defaultClasses_1.TimeStamps {
|
|
21
|
+
name;
|
|
22
|
+
phoneNumber;
|
|
23
|
+
address;
|
|
24
|
+
chargeType;
|
|
25
|
+
charge;
|
|
26
|
+
itemType;
|
|
27
|
+
isServiceFeeCharged;
|
|
28
|
+
businessDevExecutive;
|
|
29
|
+
status;
|
|
30
|
+
profilePhoto;
|
|
31
|
+
document;
|
|
32
|
+
};
|
|
33
|
+
exports.Parent = Parent;
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], Parent.prototype, "name", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], Parent.prototype, "phoneNumber", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typegoose_1.prop)({ required: true, type: address_model_1.Address }),
|
|
44
|
+
__metadata("design:type", address_model_1.Address)
|
|
45
|
+
], Parent.prototype, "address", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ChargeType }),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], Parent.prototype, "chargeType", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typegoose_1.prop)({ type: charge_model_1.Charge }),
|
|
52
|
+
__metadata("design:type", charge_model_1.Charge)
|
|
53
|
+
], Parent.prototype, "charge", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ItemType }),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], Parent.prototype, "itemType", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typegoose_1.prop)({ required: true, type: Boolean, default: true }),
|
|
60
|
+
__metadata("design:type", Boolean)
|
|
61
|
+
], Parent.prototype, "isServiceFeeCharged", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typegoose_1.prop)({ ref: () => admin_model_1.Admin }),
|
|
64
|
+
__metadata("design:type", Object)
|
|
65
|
+
], Parent.prototype, "businessDevExecutive", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typegoose_1.prop)({ type: String, enum: enum_1.Status, default: enum_1.Status.ACTIVE }),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], Parent.prototype, "status", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], Parent.prototype, "profilePhoto", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typegoose_1.prop)({ required: true, type: parent_document_model_1.ParentDocument }),
|
|
76
|
+
__metadata("design:type", parent_document_model_1.ParentDocument)
|
|
77
|
+
], Parent.prototype, "document", void 0);
|
|
78
|
+
exports.Parent = Parent = __decorate([
|
|
79
|
+
(0, typegoose_1.index)({ companyName: 1, itemType: 1 }, { unique: true, partialFilterExpression: { deletedAt: null }, name: 'companyName_itemType_unique' }),
|
|
80
|
+
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'parents' } })
|
|
81
|
+
], Parent);
|
|
82
|
+
exports.ParentModel = (0, typegoose_1.getModelForClass)(Parent);
|
|
83
|
+
//# sourceMappingURL=parent.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parent.model.js","sourceRoot":"/","sources":["libraries/mongo/models/parent.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAyG;AACzG,4EAAqE;AACrE,0DAAiD;AACjD,kDAAuE;AACvE,0DAAiD;AACjD,+CAAsC;AACtC,4EAAkE;AAO3D,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,2BAAU;IAE9B,IAAI,CAAU;IAGd,WAAW,CAAU;IAGrB,OAAO,CAAW;IAGlB,UAAU,CAAU;IAGpB,MAAM,CAAU;IAGhB,QAAQ,CAAY;IAGpB,mBAAmB,CAAW;IAG9B,oBAAoB,CAAc;IAGlC,MAAM,CAAU;IAGhB,YAAY,CAAU;IAGtB,QAAQ,CAAkB;CACjC,C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B,sCAAc;wCAAC;iBAhCrB,MAAM;IALlB,IAAA,iBAAK,EACL,EAAE,WAAW,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,EAC/B,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,6BAA6B,EAAE,CACnG;IACA,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,CAAC;GAC9C,MAAM,CAiClB;AAEY,QAAA,WAAW,GAAmC,IAAA,4BAAgB,EAAC,MAAM,CAAC,CAAC","sourcesContent":["import { modelOptions, prop, getModelForClass, ReturnModelType, index, Ref } from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { Address } from './shared/address.model';\r\nimport { ChargeType, ItemType, Status } from '../../../utilities/enum';\r\nimport { Charge } from './embedded/charge.model';\r\nimport { Admin } from './admin.model';\r\nimport { ParentDocument } from './embedded/parent-document.model';\r\n\r\n@index(\r\n\t{ companyName: 1, itemType: 1 },\r\n\t{ unique: true, partialFilterExpression: { deletedAt: null }, name: 'companyName_itemType_unique' }\r\n)\r\n@modelOptions({ schemaOptions: { collection: 'parents' } })\r\nexport class Parent extends TimeStamps {\r\n\t@prop({ required: true, type: String })\r\n\tpublic name!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic phoneNumber!: string;\r\n\r\n\t@prop({ required: true, type: Address })\r\n\tpublic address!: Address;\r\n\r\n\t@prop({ required: true, type: String, enum: ChargeType })\r\n\tpublic chargeType!: string;\r\n\r\n\t@prop({ type: Charge })\r\n\tpublic charge?: Charge;\r\n\r\n\t@prop({ required: true, type: String, enum: ItemType })\r\n\tpublic itemType!: ItemType;\r\n\r\n\t@prop({ required: true, type: Boolean, default: true })\r\n\tpublic isServiceFeeCharged!: boolean;\r\n\r\n\t@prop({ ref: () => Admin })\r\n\tpublic businessDevExecutive?: Ref<Admin>;\r\n\r\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\r\n\tpublic status?: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic profilePhoto!: string;\r\n\r\n\t@prop({ required: true, type: ParentDocument })\r\n\tpublic document!: ParentDocument;\r\n}\r\n\r\nexport const ParentModel: ReturnModelType<typeof Parent> = getModelForClass(Parent);\r\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payout.model.js","sourceRoot":"/","sources":["libraries/mongo/models/payout.model.ts"],"names":[],"mappings":";;;AAAA,MAAa,MAAM;CAAG;AAAtB,wBAAsB","sourcesContent":["export class Payout {}\r\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Ref, ReturnModelType } from '@typegoose/typegoose';
|
|
2
|
+
import { Product } from './product.model';
|
|
3
|
+
import { Marketing } from './marketing.model';
|
|
4
|
+
import { ValueType } from '../../../utilities/enum';
|
|
5
|
+
import { LoyaltyPointCategory } from './loyalty-point-category.model';
|
|
6
|
+
export declare class ProductMarketing {
|
|
7
|
+
product: Ref<Product>;
|
|
8
|
+
marketing: Ref<Marketing>;
|
|
9
|
+
loyaltyPointCategory?: Ref<LoyaltyPointCategory>;
|
|
10
|
+
valueType?: ValueType;
|
|
11
|
+
value: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const ProductMarketingModel: ReturnModelType<typeof ProductMarketing>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ProductMarketingModel = exports.ProductMarketing = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const product_model_1 = require("./product.model");
|
|
15
|
+
const marketing_model_1 = require("./marketing.model");
|
|
16
|
+
const enum_1 = require("../../../utilities/enum");
|
|
17
|
+
const loyalty_point_category_model_1 = require("./loyalty-point-category.model");
|
|
18
|
+
let ProductMarketing = class ProductMarketing {
|
|
19
|
+
product;
|
|
20
|
+
marketing;
|
|
21
|
+
loyaltyPointCategory;
|
|
22
|
+
valueType;
|
|
23
|
+
value;
|
|
24
|
+
};
|
|
25
|
+
exports.ProductMarketing = ProductMarketing;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typegoose_1.prop)({ required: true, ref: () => product_model_1.Product }),
|
|
28
|
+
__metadata("design:type", Object)
|
|
29
|
+
], ProductMarketing.prototype, "product", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typegoose_1.prop)({ required: true, ref: () => marketing_model_1.Marketing }),
|
|
32
|
+
__metadata("design:type", Object)
|
|
33
|
+
], ProductMarketing.prototype, "marketing", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typegoose_1.prop)({ ref: () => loyalty_point_category_model_1.LoyaltyPointCategory }),
|
|
36
|
+
__metadata("design:type", Object)
|
|
37
|
+
], ProductMarketing.prototype, "loyaltyPointCategory", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typegoose_1.prop)({ type: String, enum: enum_1.ValueType, default: enum_1.ValueType.PERCENTAGE }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], ProductMarketing.prototype, "valueType", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typegoose_1.prop)({ required: true, type: Number }),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], ProductMarketing.prototype, "value", void 0);
|
|
46
|
+
exports.ProductMarketing = ProductMarketing = __decorate([
|
|
47
|
+
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'productMarketings' } })
|
|
48
|
+
], ProductMarketing);
|
|
49
|
+
exports.ProductMarketingModel = (0, typegoose_1.getModelForClass)(ProductMarketing);
|
|
50
|
+
//# sourceMappingURL=product-marketing.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-marketing.model.js","sourceRoot":"/","sources":["libraries/mongo/models/product-marketing.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAkG;AAClG,mDAA0C;AAC1C,uDAA8C;AAC9C,kDAAoD;AACpD,iFAAsE;AAG/D,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAErB,OAAO,CAAgB;IAGvB,SAAS,CAAkB;IAG3B,oBAAoB,CAA6B;IAGjD,SAAS,CAAa;IAGtB,KAAK,CAAU;CACtB,CAAA;AAfY,4CAAgB;AAErB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,uBAAO,EAAE,CAAC;;iDACf;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,2BAAS,EAAE,CAAC;;mDACb;AAG3B;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mDAAoB,EAAE,CAAC;;8DACc;AAGjD;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAS,EAAE,OAAO,EAAE,gBAAS,CAAC,UAAU,EAAE,CAAC;;mDAC1C;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+CACjB;2BAdV,gBAAgB;IAD5B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,mBAAmB,EAAE,EAAE,CAAC;GACxD,gBAAgB,CAe5B;AAEY,QAAA,qBAAqB,GACjC,IAAA,4BAAgB,EAAC,gBAAgB,CAAC,CAAC","sourcesContent":["import { getModelForClass, modelOptions, prop, Ref, ReturnModelType } from '@typegoose/typegoose';\r\nimport { Product } from './product.model';\r\nimport { Marketing } from './marketing.model';\r\nimport { ValueType } from '../../../utilities/enum';\r\nimport { LoyaltyPointCategory } from './loyalty-point-category.model';\r\n\r\n@modelOptions({ schemaOptions: { collection: 'productMarketings' } })\r\nexport class ProductMarketing {\r\n\t@prop({ required: true, ref: () => Product })\r\n\tpublic product!: Ref<Product>;\r\n\r\n\t@prop({ required: true, ref: () => Marketing })\r\n\tpublic marketing!: Ref<Marketing>;\r\n\r\n\t@prop({ ref: () => LoyaltyPointCategory }) // this field only for loyalty marketing\r\n\tpublic loyaltyPointCategory?: Ref<LoyaltyPointCategory>;\r\n\r\n\t@prop({ type: String, enum: ValueType, default: ValueType.PERCENTAGE })\r\n\tpublic valueType?: ValueType;\r\n\r\n\t@prop({ required: true, type: Number })\r\n\tpublic value!: number;\r\n}\r\n\r\nexport const ProductMarketingModel: ReturnModelType<typeof ProductMarketing> =\r\n\tgetModelForClass(ProductMarketing);\r\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReturnModelType } from '@typegoose/typegoose';
|
|
2
|
+
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
3
|
+
import { ProductNutrition } from './embedded/product-nutrition.model';
|
|
4
|
+
import { FoodGroup, ItemType, ProductDietaryType, Status } from '../../../utilities/enum';
|
|
5
|
+
export declare class Product extends TimeStamps {
|
|
6
|
+
name: string;
|
|
7
|
+
barcode?: string;
|
|
8
|
+
itemType: ItemType;
|
|
9
|
+
foodGroup?: FoodGroup;
|
|
10
|
+
images: string[];
|
|
11
|
+
status?: Status;
|
|
12
|
+
nutritionServingSize?: number;
|
|
13
|
+
nutritionServingUnit?: string;
|
|
14
|
+
nutritionPerUnit?: number;
|
|
15
|
+
nutritionCalories?: number;
|
|
16
|
+
nutritions?: ProductNutrition[];
|
|
17
|
+
dietaryTypes?: ProductDietaryType[];
|
|
18
|
+
storingTemperature?: number;
|
|
19
|
+
storingTemperatureUnit?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const ProductModel: ReturnModelType<typeof Product>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ProductModel = exports.Product = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
15
|
+
const product_nutrition_model_1 = require("./embedded/product-nutrition.model");
|
|
16
|
+
const enum_1 = require("../../../utilities/enum");
|
|
17
|
+
let Product = class Product extends defaultClasses_1.TimeStamps {
|
|
18
|
+
name;
|
|
19
|
+
barcode;
|
|
20
|
+
itemType;
|
|
21
|
+
foodGroup;
|
|
22
|
+
images;
|
|
23
|
+
status;
|
|
24
|
+
nutritionServingSize;
|
|
25
|
+
nutritionServingUnit;
|
|
26
|
+
nutritionPerUnit;
|
|
27
|
+
nutritionCalories;
|
|
28
|
+
nutritions;
|
|
29
|
+
dietaryTypes;
|
|
30
|
+
storingTemperature;
|
|
31
|
+
storingTemperatureUnit;
|
|
32
|
+
};
|
|
33
|
+
exports.Product = Product;
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], Product.prototype, "name", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typegoose_1.prop)({ type: String }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], Product.prototype, "barcode", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ItemType }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], Product.prototype, "itemType", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typegoose_1.prop)({ type: String, enum: enum_1.FoodGroup }),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], Product.prototype, "foodGroup", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typegoose_1.prop)({ required: true, type: [String] }),
|
|
52
|
+
__metadata("design:type", Array)
|
|
53
|
+
], Product.prototype, "images", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typegoose_1.prop)({ type: String, enum: enum_1.Status, default: enum_1.Status.ACTIVE }),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], Product.prototype, "status", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typegoose_1.prop)({ type: Number, min: 0 }),
|
|
60
|
+
__metadata("design:type", Number)
|
|
61
|
+
], Product.prototype, "nutritionServingSize", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typegoose_1.prop)({ type: String }),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], Product.prototype, "nutritionServingUnit", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typegoose_1.prop)({ type: Number, min: 0 }),
|
|
68
|
+
__metadata("design:type", Number)
|
|
69
|
+
], Product.prototype, "nutritionPerUnit", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typegoose_1.prop)({ type: Number, min: 0 }),
|
|
72
|
+
__metadata("design:type", Number)
|
|
73
|
+
], Product.prototype, "nutritionCalories", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typegoose_1.prop)({ type: [product_nutrition_model_1.ProductNutrition], default: [] }),
|
|
76
|
+
__metadata("design:type", Array)
|
|
77
|
+
], Product.prototype, "nutritions", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typegoose_1.prop)({ type: [String], enum: enum_1.ProductDietaryType, default: [] }),
|
|
80
|
+
__metadata("design:type", Array)
|
|
81
|
+
], Product.prototype, "dietaryTypes", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, typegoose_1.prop)({ type: Number }),
|
|
84
|
+
__metadata("design:type", Number)
|
|
85
|
+
], Product.prototype, "storingTemperature", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, typegoose_1.prop)({ type: String }),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], Product.prototype, "storingTemperatureUnit", void 0);
|
|
90
|
+
exports.Product = Product = __decorate([
|
|
91
|
+
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'products' } }),
|
|
92
|
+
(0, typegoose_1.Index)({ name: 1, itemType: 1 }, { unique: true, partialFilterExpression: { itemType: { $in: [enum_1.ItemType.GROCERY, enum_1.ItemType.PHARMACY] } } })
|
|
93
|
+
], Product);
|
|
94
|
+
exports.ProductModel = (0, typegoose_1.getModelForClass)(Product);
|
|
95
|
+
//# sourceMappingURL=product.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product.model.js","sourceRoot":"/","sources":["libraries/mongo/models/product.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoG;AACpG,4EAAqE;AACrE,gFAAsE;AACtE,kDAA0F;AAOnF,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,2BAAU;IAE/B,IAAI,CAAU;IAGd,OAAO,CAAU;IAGjB,QAAQ,CAAY;IAGpB,SAAS,CAAa;IAGtB,MAAM,CAAY;IAGlB,MAAM,CAAU;IAGhB,oBAAoB,CAAU;IAG9B,oBAAoB,CAAU;IAG9B,gBAAgB,CAAU;IAG1B,iBAAiB,CAAU;IAG3B,UAAU,CAAsB;IAGhC,YAAY,CAAwB;IAGpC,kBAAkB,CAAU;IAG5B,sBAAsB,CAAU;CACvC,CAAA;AA1CY,0BAAO;AAEZ;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qCAClB;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;wCACC;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,eAAQ,EAAE,CAAC;;yCAC5B;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAS,EAAE,CAAC;;0CACX;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;;uCAChB;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAM,EAAE,OAAO,EAAE,aAAM,CAAC,MAAM,EAAE,CAAC;;uCACtC;AAGhB;IADN,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turnModelType } from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { ProductNutrition } from './embedded/product-nutrition.model';\r\nimport { FoodGroup, ItemType, ProductDietaryType, Status } from '../../../utilities/enum';\r\n\r\n@modelOptions({ schemaOptions: { collection: 'products' } })\r\n@Index(\r\n\t{ name: 1, itemType: 1 },\r\n\t{ unique: true, partialFilterExpression: { itemType: { $in: [ItemType.GROCERY, ItemType.PHARMACY] } } }\r\n)\r\nexport class Product extends TimeStamps {\r\n\t@prop({ required: true, type: String })\r\n\tpublic name!: string;\r\n\r\n\t@prop({ type: String })\r\n\tpublic barcode?: string;\r\n\r\n\t@prop({ required: true, type: String, enum: ItemType })\r\n\tpublic itemType!: ItemType;\r\n\r\n\t@prop({ type: String, enum: FoodGroup })\r\n\tpublic foodGroup?: FoodGroup;\r\n\r\n\t@prop({ required: true, type: [String] })\r\n\tpublic images!: string[];\r\n\r\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\r\n\tpublic status?: Status;\r\n\r\n\t@prop({ type: Number, min: 0 })\r\n\tpublic nutritionServingSize?: number;\r\n\r\n\t@prop({ type: String })\r\n\tpublic nutritionServingUnit?: string;\r\n\r\n\t@prop({ type: Number, min: 0 })\r\n\tpublic nutritionPerUnit?: number;\r\n\r\n\t@prop({ type: Number, min: 0 })\r\n\tpublic nutritionCalories?: number;\r\n\r\n\t@prop({ type: [ProductNutrition], default: [] })\r\n\tpublic nutritions?: ProductNutrition[];\r\n\r\n\t@prop({ type: [String], enum: ProductDietaryType, default: [] })\r\n\tpublic dietaryTypes?: ProductDietaryType[];\r\n\r\n\t@prop({ type: Number })\r\n\tpublic storingTemperature?: number;\r\n\r\n\t@prop({ type: String })\r\n\tpublic storingTemperatureUnit?: string;\r\n}\r\n\r\nexport const ProductModel: ReturnModelType<typeof Product> = getModelForClass(Product);\r\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReturnModelType } from '@typegoose/typegoose';
|
|
2
|
+
import { AuthIdentity } from '../auth-identity.model';
|
|
3
|
+
export declare class AppleAuthIdentity extends AuthIdentity {
|
|
4
|
+
token: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const CoreAppleAuthIdentityModel: ReturnModelType<typeof AppleAuthIdentity>;
|