@bonifaceebuka/core-backend 1.0.0
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/Readme.md +33 -0
- package/dist/app.js +59 -0
- package/dist/common/configs/axios.d.ts +7 -0
- package/dist/common/configs/axios.d.ts.map +1 -0
- package/dist/common/configs/axios.js +26 -0
- package/dist/common/configs/cloudinary.d.ts +3 -0
- package/dist/common/configs/cloudinary.d.ts.map +1 -0
- package/dist/common/configs/cloudinary.js +10 -0
- package/dist/common/configs/cors.d.ts +8 -0
- package/dist/common/configs/cors.d.ts.map +1 -0
- package/dist/common/configs/cors.js +23 -0
- package/dist/common/configs/express.js +29 -0
- package/dist/common/configs/index.d.ts +111 -0
- package/dist/common/configs/index.d.ts.map +1 -0
- package/dist/common/configs/index.js +168 -0
- package/dist/common/configs/logger.d.ts +3 -0
- package/dist/common/configs/logger.d.ts.map +1 -0
- package/dist/common/configs/logger.js +66 -0
- package/dist/common/configs/mailing.d.ts +4 -0
- package/dist/common/configs/mailing.d.ts.map +1 -0
- package/dist/common/configs/mailing.js +22 -0
- package/dist/common/configs/plans.d.ts +15 -0
- package/dist/common/configs/plans.d.ts.map +1 -0
- package/dist/common/configs/plans.js +17 -0
- package/dist/common/configs/postgres.d.ts +4 -0
- package/dist/common/configs/postgres.d.ts.map +1 -0
- package/dist/common/configs/postgres.js +25 -0
- package/dist/common/configs/redis.d.ts +5 -0
- package/dist/common/configs/redis.d.ts.map +1 -0
- package/dist/common/configs/redis.js +78 -0
- package/dist/common/configs/sendgrid.d.ts +3 -0
- package/dist/common/configs/sendgrid.d.ts.map +1 -0
- package/dist/common/configs/sendgrid.js +21 -0
- package/dist/common/configs/websocket.js +17 -0
- package/dist/common/constants/chat.d.ts +18 -0
- package/dist/common/constants/chat.d.ts.map +1 -0
- package/dist/common/constants/chat.js +20 -0
- package/dist/common/constants/messages/admin.messages.d.ts +33 -0
- package/dist/common/constants/messages/admin.messages.d.ts.map +1 -0
- package/dist/common/constants/messages/admin.messages.js +35 -0
- package/dist/common/constants/messages/index.d.ts +19 -0
- package/dist/common/constants/messages/index.d.ts.map +1 -0
- package/dist/common/constants/messages/index.js +21 -0
- package/dist/common/constants/messages/user.messages.d.ts +33 -0
- package/dist/common/constants/messages/user.messages.d.ts.map +1 -0
- package/dist/common/constants/messages/user.messages.js +35 -0
- package/dist/common/dtos/AdminDto.d.ts +5 -0
- package/dist/common/dtos/AdminDto.d.ts.map +1 -0
- package/dist/common/dtos/AdminDto.js +30 -0
- package/dist/common/dtos/ArticleDto.d.ts +11 -0
- package/dist/common/dtos/ArticleDto.d.ts.map +1 -0
- package/dist/common/dtos/ArticleDto.js +61 -0
- package/dist/common/dtos/BusinessDto.d.ts +12 -0
- package/dist/common/dtos/BusinessDto.d.ts.map +1 -0
- package/dist/common/dtos/BusinessDto.js +59 -0
- package/dist/common/dtos/ChatDto.d.ts +17 -0
- package/dist/common/dtos/ChatDto.d.ts.map +1 -0
- package/dist/common/dtos/ChatDto.js +89 -0
- package/dist/common/dtos/CommonDto.d.ts +13 -0
- package/dist/common/dtos/CommonDto.d.ts.map +1 -0
- package/dist/common/dtos/CommonDto.js +59 -0
- package/dist/common/dtos/CommunityDto.d.ts +10 -0
- package/dist/common/dtos/CommunityDto.d.ts.map +1 -0
- package/dist/common/dtos/CommunityDto.js +72 -0
- package/dist/common/dtos/EventDto.d.ts +24 -0
- package/dist/common/dtos/EventDto.d.ts.map +1 -0
- package/dist/common/dtos/EventDto.js +72 -0
- package/dist/common/dtos/IPaginator.d.ts +15 -0
- package/dist/common/dtos/IPaginator.d.ts.map +1 -0
- package/dist/common/dtos/IPaginator.js +40 -0
- package/dist/common/dtos/Paginator.d.ts +15 -0
- package/dist/common/dtos/Paginator.d.ts.map +1 -0
- package/dist/common/dtos/Paginator.js +40 -0
- package/dist/common/dtos/Plan.dto.d.ts +10 -0
- package/dist/common/dtos/Plan.dto.d.ts.map +1 -0
- package/dist/common/dtos/Plan.dto.js +66 -0
- package/dist/common/dtos/PostDto.d.ts +13 -0
- package/dist/common/dtos/PostDto.d.ts.map +1 -0
- package/dist/common/dtos/PostDto.js +75 -0
- package/dist/common/dtos/ProductDto.d.ts +13 -0
- package/dist/common/dtos/ProductDto.d.ts.map +1 -0
- package/dist/common/dtos/ProductDto.js +66 -0
- package/dist/common/dtos/ServiceDto.d.ts +19 -0
- package/dist/common/dtos/ServiceDto.d.ts.map +1 -0
- package/dist/common/dtos/ServiceDto.js +93 -0
- package/dist/common/dtos/UserDto.d.ts +70 -0
- package/dist/common/dtos/UserDto.d.ts.map +1 -0
- package/dist/common/dtos/UserDto.js +313 -0
- package/dist/common/enums/ChatEnum.d.ts +6 -0
- package/dist/common/enums/ChatEnum.d.ts.map +1 -0
- package/dist/common/enums/ChatEnum.js +9 -0
- package/dist/common/enums/CommunityEnum.d.ts +14 -0
- package/dist/common/enums/CommunityEnum.d.ts.map +1 -0
- package/dist/common/enums/CommunityEnum.js +19 -0
- package/dist/common/enums/ConnectionEnum.d.ts +11 -0
- package/dist/common/enums/ConnectionEnum.d.ts.map +1 -0
- package/dist/common/enums/ConnectionEnum.js +15 -0
- package/dist/common/enums/EventEnum.d.ts +7 -0
- package/dist/common/enums/EventEnum.d.ts.map +1 -0
- package/dist/common/enums/EventEnum.js +10 -0
- package/dist/common/enums/IndexEnum.d.ts +56 -0
- package/dist/common/enums/IndexEnum.d.ts.map +1 -0
- package/dist/common/enums/IndexEnum.js +67 -0
- package/dist/common/enums/MarketplaceEnum.d.ts +9 -0
- package/dist/common/enums/MarketplaceEnum.d.ts.map +1 -0
- package/dist/common/enums/MarketplaceEnum.js +13 -0
- package/dist/common/enums/NotificationEnum.d.ts +7 -0
- package/dist/common/enums/NotificationEnum.d.ts.map +1 -0
- package/dist/common/enums/NotificationEnum.js +10 -0
- package/dist/common/enums/TransactionEnum.d.ts +9 -0
- package/dist/common/enums/TransactionEnum.d.ts.map +1 -0
- package/dist/common/enums/TransactionEnum.js +13 -0
- package/dist/common/enums/UploadEnum.d.ts +15 -0
- package/dist/common/enums/UploadEnum.d.ts.map +1 -0
- package/dist/common/enums/UploadEnum.js +19 -0
- package/dist/common/enums/UserEnums.d.ts +36 -0
- package/dist/common/enums/UserEnums.d.ts.map +1 -0
- package/dist/common/enums/UserEnums.js +44 -0
- package/dist/common/enums/index.d.ts +65 -0
- package/dist/common/enums/index.d.ts.map +1 -0
- package/dist/common/enums/index.js +90 -0
- package/dist/common/errors/AppError.d.ts +6 -0
- package/dist/common/errors/AppError.d.ts.map +1 -0
- package/dist/common/errors/AppError.js +14 -0
- package/dist/common/types/HttpType.d.ts +11 -0
- package/dist/common/types/HttpType.d.ts.map +1 -0
- package/dist/common/types/HttpType.js +47 -0
- package/dist/common/types/IPagination.d.ts +15 -0
- package/dist/common/types/IPagination.d.ts.map +1 -0
- package/dist/common/types/IPagination.js +2 -0
- package/dist/common/types/Isocket.d.ts +6 -0
- package/dist/common/types/Isocket.d.ts.map +1 -0
- package/dist/common/types/Isocket.js +2 -0
- package/dist/common/types/chatType.d.ts +36 -0
- package/dist/common/types/chatType.d.ts.map +1 -0
- package/dist/common/types/chatType.js +2 -0
- package/dist/common/types/index.d.ts +6 -0
- package/dist/common/types/index.d.ts.map +1 -0
- package/dist/common/types/index.js +21 -0
- package/dist/common/types/mail.d.ts +7 -0
- package/dist/common/types/mail.d.ts.map +1 -0
- package/dist/common/types/mail.js +2 -0
- package/dist/common/types/uploadsType.d.ts +14 -0
- package/dist/common/types/uploadsType.d.ts.map +1 -0
- package/dist/common/types/uploadsType.js +45 -0
- package/dist/common/utils/axios.js +26 -0
- package/dist/common/utils/index.d.ts +28 -0
- package/dist/common/utils/index.d.ts.map +1 -0
- package/dist/common/utils/index.js +159 -0
- package/dist/common/utils/mailing.d.ts +2 -0
- package/dist/common/utils/mailing.d.ts.map +1 -0
- package/dist/common/utils/mailing.js +76 -0
- package/dist/common/utils/number_utils.d.ts +3 -0
- package/dist/common/utils/number_utils.d.ts.map +1 -0
- package/dist/common/utils/number_utils.js +10 -0
- package/dist/common/utils/responseHandlers.d.ts +44 -0
- package/dist/common/utils/responseHandlers.d.ts.map +1 -0
- package/dist/common/utils/responseHandlers.js +49 -0
- package/dist/common/utils/security.d.ts +7 -0
- package/dist/common/utils/security.d.ts.map +1 -0
- package/dist/common/utils/security.js +44 -0
- package/dist/common/utils/socket.js +16 -0
- package/dist/common/utils/validator.d.ts +6 -0
- package/dist/common/utils/validator.d.ts.map +1 -0
- package/dist/common/utils/validator.js +43 -0
- package/dist/database/migrations/1765969273227-create-base-migrations.d.ts +7 -0
- package/dist/database/migrations/1765969273227-create-base-migrations.d.ts.map +1 -0
- package/dist/database/migrations/1765969273227-create-base-migrations.js +53 -0
- package/dist/database/migrations/1765981653813-modify-users-table.d.ts +7 -0
- package/dist/database/migrations/1765981653813-modify-users-table.d.ts.map +1 -0
- package/dist/database/migrations/1765981653813-modify-users-table.js +19 -0
- package/dist/database/migrations/1766478443902-create_step_one_form_data_tables.d.ts +7 -0
- package/dist/database/migrations/1766478443902-create_step_one_form_data_tables.d.ts.map +1 -0
- package/dist/database/migrations/1766478443902-create_step_one_form_data_tables.js +79 -0
- package/dist/database/migrations/1766482587930-create_speeches_table.d.ts +7 -0
- package/dist/database/migrations/1766482587930-create_speeches_table.d.ts.map +1 -0
- package/dist/database/migrations/1766482587930-create_speeches_table.js +91 -0
- package/dist/database/migrations/1766486689085-create_challenges_and_education_table.d.ts +7 -0
- package/dist/database/migrations/1766486689085-create_challenges_and_education_table.d.ts.map +1 -0
- package/dist/database/migrations/1766486689085-create_challenges_and_education_table.js +21 -0
- package/dist/database/migrations/1766488441761-create_goals_table.d.ts +7 -0
- package/dist/database/migrations/1766488441761-create_goals_table.d.ts.map +1 -0
- package/dist/database/migrations/1766488441761-create_goals_table.js +13 -0
- package/dist/database/migrations/1766596709454-events_related_tables.d.ts +7 -0
- package/dist/database/migrations/1766596709454-events_related_tables.d.ts.map +1 -0
- package/dist/database/migrations/1766596709454-events_related_tables.js +27 -0
- package/dist/database/migrations/1767290352669-changed_country_to_location_events_table.d.ts +7 -0
- package/dist/database/migrations/1767290352669-changed_country_to_location_events_table.d.ts.map +1 -0
- package/dist/database/migrations/1767290352669-changed_country_to_location_events_table.js +47 -0
- package/dist/database/migrations/1767290877959-indexed_users_table.d.ts +7 -0
- package/dist/database/migrations/1767290877959-indexed_users_table.d.ts.map +1 -0
- package/dist/database/migrations/1767290877959-indexed_users_table.js +13 -0
- package/dist/database/migrations/1767291527448-indexed_tables.d.ts +7 -0
- package/dist/database/migrations/1767291527448-indexed_tables.d.ts.map +1 -0
- package/dist/database/migrations/1767291527448-indexed_tables.js +71 -0
- package/dist/database/migrations/1767292081954-added_event_venue_column_to_events_table.d.ts +7 -0
- package/dist/database/migrations/1767292081954-added_event_venue_column_to_events_table.d.ts.map +1 -0
- package/dist/database/migrations/1767292081954-added_event_venue_column_to_events_table.js +13 -0
- package/dist/database/migrations/1767369618268-create_billings_related_table.d.ts +7 -0
- package/dist/database/migrations/1767369618268-create_billings_related_table.d.ts.map +1 -0
- package/dist/database/migrations/1767369618268-create_billings_related_table.js +45 -0
- package/dist/database/migrations/1767404043438-create_billings_related_tables.d.ts +7 -0
- package/dist/database/migrations/1767404043438-create_billings_related_tables.d.ts.map +1 -0
- package/dist/database/migrations/1767404043438-create_billings_related_tables.js +19 -0
- package/dist/database/migrations/1767617739297-update_tables.d.ts +7 -0
- package/dist/database/migrations/1767617739297-update_tables.d.ts.map +1 -0
- package/dist/database/migrations/1767617739297-update_tables.js +27 -0
- package/dist/database/migrations/1767717097064-create_event_attendance_table.d.ts +7 -0
- package/dist/database/migrations/1767717097064-create_event_attendance_table.d.ts.map +1 -0
- package/dist/database/migrations/1767717097064-create_event_attendance_table.js +40 -0
- package/dist/database/migrations/1767792070012-added_more_fields_to_users_table.d.ts +7 -0
- package/dist/database/migrations/1767792070012-added_more_fields_to_users_table.d.ts.map +1 -0
- package/dist/database/migrations/1767792070012-added_more_fields_to_users_table.js +17 -0
- package/dist/database/migrations/1767878654013-added_more_fields_to_users_table.d.ts +7 -0
- package/dist/database/migrations/1767878654013-added_more_fields_to_users_table.d.ts.map +1 -0
- package/dist/database/migrations/1767878654013-added_more_fields_to_users_table.js +15 -0
- package/dist/database/migrations/1767882191474-added_more_fields_to_events_table.d.ts +7 -0
- package/dist/database/migrations/1767882191474-added_more_fields_to_events_table.d.ts.map +1 -0
- package/dist/database/migrations/1767882191474-added_more_fields_to_events_table.js +17 -0
- package/dist/database/migrations/1767883990258-added_coordinates_field_to_events_table.d.ts +7 -0
- package/dist/database/migrations/1767883990258-added_coordinates_field_to_events_table.d.ts.map +1 -0
- package/dist/database/migrations/1767883990258-added_coordinates_field_to_events_table.js +19 -0
- package/dist/database/migrations/1767890415337-added_coordinates_field_to_user_profiles_table.d.ts +7 -0
- package/dist/database/migrations/1767890415337-added_coordinates_field_to_user_profiles_table.d.ts.map +1 -0
- package/dist/database/migrations/1767890415337-added_coordinates_field_to_user_profiles_table.js +15 -0
- package/dist/database/migrations/1767891781321-create_location_gist_index.d.ts +6 -0
- package/dist/database/migrations/1767891781321-create_location_gist_index.d.ts.map +1 -0
- package/dist/database/migrations/1767891781321-create_location_gist_index.js +26 -0
- package/dist/database/migrations/1768486598835-create_comunity_creation_tables.d.ts +7 -0
- package/dist/database/migrations/1768486598835-create_comunity_creation_tables.d.ts.map +1 -0
- package/dist/database/migrations/1768486598835-create_comunity_creation_tables.js +47 -0
- package/dist/database/migrations/1768489253067-create_comunity_creation_tables.d.ts +7 -0
- package/dist/database/migrations/1768489253067-create_comunity_creation_tables.d.ts.map +1 -0
- package/dist/database/migrations/1768489253067-create_comunity_creation_tables.js +19 -0
- package/dist/database/migrations/1768713527323-create_posts_table.d.ts +7 -0
- package/dist/database/migrations/1768713527323-create_posts_table.d.ts.map +1 -0
- package/dist/database/migrations/1768713527323-create_posts_table.js +29 -0
- package/dist/database/migrations/1768888281914-create_post_comments_table.d.ts +7 -0
- package/dist/database/migrations/1768888281914-create_post_comments_table.d.ts.map +1 -0
- package/dist/database/migrations/1768888281914-create_post_comments_table.js +45 -0
- package/dist/database/migrations/1768897962516-tightened_the_likable_type_field_in_likes_table.d.ts +7 -0
- package/dist/database/migrations/1768897962516-tightened_the_likable_type_field_in_likes_table.d.ts.map +1 -0
- package/dist/database/migrations/1768897962516-tightened_the_likable_type_field_in_likes_table.js +21 -0
- package/dist/database/migrations/1769721210774-create_products_table.d.ts +7 -0
- package/dist/database/migrations/1769721210774-create_products_table.d.ts.map +1 -0
- package/dist/database/migrations/1769721210774-create_products_table.js +97 -0
- package/dist/database/migrations/1769728749602-modified_products_table.d.ts +7 -0
- package/dist/database/migrations/1769728749602-modified_products_table.d.ts.map +1 -0
- package/dist/database/migrations/1769728749602-modified_products_table.js +13 -0
- package/dist/database/migrations/1769852101831-create_businesses_table.d.ts +7 -0
- package/dist/database/migrations/1769852101831-create_businesses_table.d.ts.map +1 -0
- package/dist/database/migrations/1769852101831-create_businesses_table.js +35 -0
- package/dist/database/migrations/1769854726115-modified_businesses_table.d.ts +7 -0
- package/dist/database/migrations/1769854726115-modified_businesses_table.d.ts.map +1 -0
- package/dist/database/migrations/1769854726115-modified_businesses_table.js +17 -0
- package/dist/database/migrations/1770059807138-nullified_title_posts_table.d.ts +7 -0
- package/dist/database/migrations/1770059807138-nullified_title_posts_table.d.ts.map +1 -0
- package/dist/database/migrations/1770059807138-nullified_title_posts_table.js +25 -0
- package/dist/database/migrations/1770108116282-added_business_id_products_table.d.ts +7 -0
- package/dist/database/migrations/1770108116282-added_business_id_products_table.d.ts.map +1 -0
- package/dist/database/migrations/1770108116282-added_business_id_products_table.js +15 -0
- package/dist/database/migrations/1770145991793-create_service_providers_table.d.ts +7 -0
- package/dist/database/migrations/1770145991793-create_service_providers_table.d.ts.map +1 -0
- package/dist/database/migrations/1770145991793-create_service_providers_table.js +39 -0
- package/dist/database/migrations/1770202856432-modified_service_providers_table.d.ts +7 -0
- package/dist/database/migrations/1770202856432-modified_service_providers_table.d.ts.map +1 -0
- package/dist/database/migrations/1770202856432-modified_service_providers_table.js +23 -0
- package/dist/database/migrations/1770203361907-modified_service_providers_table.d.ts +7 -0
- package/dist/database/migrations/1770203361907-modified_service_providers_table.d.ts.map +1 -0
- package/dist/database/migrations/1770203361907-modified_service_providers_table.js +15 -0
- package/dist/database/migrations/1770221489298-modified_service_providers_table.d.ts +7 -0
- package/dist/database/migrations/1770221489298-modified_service_providers_table.d.ts.map +1 -0
- package/dist/database/migrations/1770221489298-modified_service_providers_table.js +15 -0
- package/dist/database/migrations/1770234277025-added_category_id_to_service_providers_table.d.ts +7 -0
- package/dist/database/migrations/1770234277025-added_category_id_to_service_providers_table.d.ts.map +1 -0
- package/dist/database/migrations/1770234277025-added_category_id_to_service_providers_table.js +15 -0
- package/dist/database/migrations/1770235034364-added_category_id_to_service_providers_table.d.ts +7 -0
- package/dist/database/migrations/1770235034364-added_category_id_to_service_providers_table.d.ts.map +1 -0
- package/dist/database/migrations/1770235034364-added_category_id_to_service_providers_table.js +17 -0
- package/dist/database/migrations/1770459229926-create_articles_table.d.ts +7 -0
- package/dist/database/migrations/1770459229926-create_articles_table.d.ts.map +1 -0
- package/dist/database/migrations/1770459229926-create_articles_table.js +61 -0
- package/dist/database/migrations/1770544472943-modified_users_table.d.ts +7 -0
- package/dist/database/migrations/1770544472943-modified_users_table.d.ts.map +1 -0
- package/dist/database/migrations/1770544472943-modified_users_table.js +15 -0
- package/dist/database/migrations/1770556066865-create_chats_table.d.ts +7 -0
- package/dist/database/migrations/1770556066865-create_chats_table.d.ts.map +1 -0
- package/dist/database/migrations/1770556066865-create_chats_table.js +37 -0
- package/dist/database/migrations/1770557237871-modified_chats_table.d.ts +7 -0
- package/dist/database/migrations/1770557237871-modified_chats_table.d.ts.map +1 -0
- package/dist/database/migrations/1770557237871-modified_chats_table.js +21 -0
- package/dist/database/migrations/1770559802657-modified_chats_table.d.ts +7 -0
- package/dist/database/migrations/1770559802657-modified_chats_table.d.ts.map +1 -0
- package/dist/database/migrations/1770559802657-modified_chats_table.js +27 -0
- package/dist/database/migrations/1770570310226-modified_chats_table.d.ts +7 -0
- package/dist/database/migrations/1770570310226-modified_chats_table.d.ts.map +1 -0
- package/dist/database/migrations/1770570310226-modified_chats_table.js +29 -0
- package/dist/database/migrations/1770574652097-modified_chats_table.d.ts +7 -0
- package/dist/database/migrations/1770574652097-modified_chats_table.d.ts.map +1 -0
- package/dist/database/migrations/1770574652097-modified_chats_table.js +31 -0
- package/dist/database/migrations/1770728516930-modified_chats_table.d.ts +7 -0
- package/dist/database/migrations/1770728516930-modified_chats_table.d.ts.map +1 -0
- package/dist/database/migrations/1770728516930-modified_chats_table.js +23 -0
- package/dist/database/seeds/CommunityDataSeeder.js +48 -0
- package/dist/database/seeds/EventDataSeeder.js +54 -0
- package/dist/database/seeds/FeatureSeeder.js +131 -0
- package/dist/database/seeds/MarketplaceDataSeeder.js +95 -0
- package/dist/database/seeds/PlanSeeder.js +78 -0
- package/dist/database/seeds/UserProfileDataSeeder.js +215 -0
- package/dist/database/seeds/index.js +39 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +26 -0
- package/dist/ioc.d.ts +6 -0
- package/dist/ioc.d.ts.map +1 -0
- package/dist/ioc.js +9 -0
- package/dist/models/AdminUserModel.d.ts +18 -0
- package/dist/models/AdminUserModel.d.ts.map +1 -0
- package/dist/models/AdminUserModel.js +92 -0
- package/dist/models/ArticleCommentModel.d.ts +14 -0
- package/dist/models/ArticleCommentModel.d.ts.map +1 -0
- package/dist/models/ArticleCommentModel.js +69 -0
- package/dist/models/ArticleImageModel.d.ts +10 -0
- package/dist/models/ArticleImageModel.d.ts.map +1 -0
- package/dist/models/ArticleImageModel.js +45 -0
- package/dist/models/ArticleModel.d.ts +16 -0
- package/dist/models/ArticleModel.d.ts.map +1 -0
- package/dist/models/ArticleModel.js +70 -0
- package/dist/models/BaseModel.d.ts +8 -0
- package/dist/models/BaseModel.d.ts.map +1 -0
- package/dist/models/BaseModel.js +43 -0
- package/dist/models/BookmarkModel.d.ts +8 -0
- package/dist/models/BookmarkModel.d.ts.map +1 -0
- package/dist/models/BookmarkModel.js +40 -0
- package/dist/models/BusinessCategoryModel.d.ts +5 -0
- package/dist/models/BusinessCategoryModel.d.ts.map +1 -0
- package/dist/models/BusinessCategoryModel.js +25 -0
- package/dist/models/BusinessIdCategoryModel.d.ts +5 -0
- package/dist/models/BusinessIdCategoryModel.d.ts.map +1 -0
- package/dist/models/BusinessIdCategoryModel.js +25 -0
- package/dist/models/BusinessModel.d.ts +22 -0
- package/dist/models/BusinessModel.d.ts.map +1 -0
- package/dist/models/BusinessModel.js +103 -0
- package/dist/models/BusinessServiceModel.d.ts +12 -0
- package/dist/models/BusinessServiceModel.d.ts.map +1 -0
- package/dist/models/BusinessServiceModel.js +54 -0
- package/dist/models/CardModel.d.ts +19 -0
- package/dist/models/CardModel.d.ts.map +1 -0
- package/dist/models/CardModel.js +91 -0
- package/dist/models/CategoryModel.d.ts +5 -0
- package/dist/models/CategoryModel.d.ts.map +1 -0
- package/dist/models/CategoryModel.js +25 -0
- package/dist/models/ChallengeModel.d.ts +6 -0
- package/dist/models/ChallengeModel.d.ts.map +1 -0
- package/dist/models/ChallengeModel.js +30 -0
- package/dist/models/ChatMessageModel.d.ts +16 -0
- package/dist/models/ChatMessageModel.d.ts.map +1 -0
- package/dist/models/ChatMessageModel.js +75 -0
- package/dist/models/CommentModel.d.ts +14 -0
- package/dist/models/CommentModel.d.ts.map +1 -0
- package/dist/models/CommentModel.js +69 -0
- package/dist/models/CommunityMemberModel.d.ts +12 -0
- package/dist/models/CommunityMemberModel.d.ts.map +1 -0
- package/dist/models/CommunityMemberModel.js +55 -0
- package/dist/models/CommunityModel.d.ts +22 -0
- package/dist/models/CommunityModel.d.ts.map +1 -0
- package/dist/models/CommunityModel.js +97 -0
- package/dist/models/CommunityTopicModel.d.ts +10 -0
- package/dist/models/CommunityTopicModel.d.ts.map +1 -0
- package/dist/models/CommunityTopicModel.js +45 -0
- package/dist/models/ConnectionModel.d.ts +11 -0
- package/dist/models/ConnectionModel.d.ts.map +1 -0
- package/dist/models/ConnectionModel.js +53 -0
- package/dist/models/ConversationModel.d.ts +8 -0
- package/dist/models/ConversationModel.d.ts.map +1 -0
- package/dist/models/ConversationModel.js +43 -0
- package/dist/models/DiagnosisLevelModel.d.ts +7 -0
- package/dist/models/DiagnosisLevelModel.d.ts.map +1 -0
- package/dist/models/DiagnosisLevelModel.js +32 -0
- package/dist/models/EducationModel.d.ts +5 -0
- package/dist/models/EducationModel.d.ts.map +1 -0
- package/dist/models/EducationModel.js +25 -0
- package/dist/models/EventAttendanceModel.d.ts +10 -0
- package/dist/models/EventAttendanceModel.d.ts.map +1 -0
- package/dist/models/EventAttendanceModel.js +45 -0
- package/dist/models/EventModel.d.ts +25 -0
- package/dist/models/EventModel.d.ts.map +1 -0
- package/dist/models/EventModel.js +119 -0
- package/dist/models/EventTypeModel.d.ts +7 -0
- package/dist/models/EventTypeModel.d.ts.map +1 -0
- package/dist/models/EventTypeModel.js +31 -0
- package/dist/models/FeatureModel.d.ts +9 -0
- package/dist/models/FeatureModel.d.ts.map +1 -0
- package/dist/models/FeatureModel.js +50 -0
- package/dist/models/GoalModel.d.ts +5 -0
- package/dist/models/GoalModel.d.ts.map +1 -0
- package/dist/models/GoalModel.js +25 -0
- package/dist/models/InterestModel.d.ts +7 -0
- package/dist/models/InterestModel.d.ts.map +1 -0
- package/dist/models/InterestModel.js +32 -0
- package/dist/models/LikeModel.d.ts +10 -0
- package/dist/models/LikeModel.d.ts.map +1 -0
- package/dist/models/LikeModel.js +48 -0
- package/dist/models/NotificationModel.d.ts +14 -0
- package/dist/models/NotificationModel.d.ts.map +1 -0
- package/dist/models/NotificationModel.js +66 -0
- package/dist/models/PaymentGatewayCustomerModel.d.ts +6 -0
- package/dist/models/PaymentGatewayCustomerModel.d.ts.map +1 -0
- package/dist/models/PaymentGatewayCustomerModel.js +31 -0
- package/dist/models/PlanFeatureModel.d.ts +11 -0
- package/dist/models/PlanFeatureModel.d.ts.map +1 -0
- package/dist/models/PlanFeatureModel.js +50 -0
- package/dist/models/PlanModel.d.ts +15 -0
- package/dist/models/PlanModel.d.ts.map +1 -0
- package/dist/models/PlanModel.js +68 -0
- package/dist/models/PostImageModel.d.ts +10 -0
- package/dist/models/PostImageModel.d.ts.map +1 -0
- package/dist/models/PostImageModel.js +45 -0
- package/dist/models/PostModel.d.ts +20 -0
- package/dist/models/PostModel.d.ts.map +1 -0
- package/dist/models/PostModel.js +87 -0
- package/dist/models/ProductImageModel.d.ts +10 -0
- package/dist/models/ProductImageModel.d.ts.map +1 -0
- package/dist/models/ProductImageModel.js +45 -0
- package/dist/models/ProductModel.d.ts +20 -0
- package/dist/models/ProductModel.d.ts.map +1 -0
- package/dist/models/ProductModel.js +96 -0
- package/dist/models/ReviewModel.d.ts +7 -0
- package/dist/models/ReviewModel.d.ts.map +1 -0
- package/dist/models/ReviewModel.js +36 -0
- package/dist/models/ServiceProviderModel.d.ts +23 -0
- package/dist/models/ServiceProviderModel.d.ts.map +1 -0
- package/dist/models/ServiceProviderModel.js +109 -0
- package/dist/models/SessionModel.d.ts +8 -0
- package/dist/models/SessionModel.d.ts.map +1 -0
- package/dist/models/SessionModel.js +40 -0
- package/dist/models/SpeechModel.d.ts +7 -0
- package/dist/models/SpeechModel.d.ts.map +1 -0
- package/dist/models/SpeechModel.js +32 -0
- package/dist/models/SubscriptionHistoryModel.d.ts +12 -0
- package/dist/models/SubscriptionHistoryModel.d.ts.map +1 -0
- package/dist/models/SubscriptionHistoryModel.js +60 -0
- package/dist/models/SubscriptionModel.d.ts +11 -0
- package/dist/models/SubscriptionModel.d.ts.map +1 -0
- package/dist/models/SubscriptionModel.js +53 -0
- package/dist/models/TopicModel.d.ts +7 -0
- package/dist/models/TopicModel.d.ts.map +1 -0
- package/dist/models/TopicModel.js +31 -0
- package/dist/models/TransactionModel.d.ts +15 -0
- package/dist/models/TransactionModel.d.ts.map +1 -0
- package/dist/models/TransactionModel.js +76 -0
- package/dist/models/UploadModel.d.ts +24 -0
- package/dist/models/UploadModel.d.ts.map +1 -0
- package/dist/models/UploadModel.js +119 -0
- package/dist/models/UserModel.d.ts +47 -0
- package/dist/models/UserModel.d.ts.map +1 -0
- package/dist/models/UserModel.js +237 -0
- package/dist/models/UserProfileModel.d.ts +28 -0
- package/dist/models/UserProfileModel.d.ts.map +1 -0
- package/dist/models/UserProfileModel.js +138 -0
- package/dist/models/index.d.ts +49 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +64 -0
- package/dist/services/StripeService.js +288 -0
- package/dist/services/mobile/ArticleCommentService.js +479 -0
- package/dist/services/mobile/ArticleService.js +507 -0
- package/dist/services/mobile/AuthService.js +362 -0
- package/dist/services/mobile/BusinessService.js +267 -0
- package/dist/services/mobile/BusinessServiceService.js +383 -0
- package/dist/services/mobile/CardService.js +249 -0
- package/dist/services/mobile/ChatService.js +324 -0
- package/dist/services/mobile/CommunityMemberService.js +193 -0
- package/dist/services/mobile/CommunityService.js +561 -0
- package/dist/services/mobile/CompleteProfileService.js +308 -0
- package/dist/services/mobile/ConnectionService.js +338 -0
- package/dist/services/mobile/EventAttendanceService.js +343 -0
- package/dist/services/mobile/EventService.js +540 -0
- package/dist/services/mobile/NotificationService.js +89 -0
- package/dist/services/mobile/PasswordResetService.js +168 -0
- package/dist/services/mobile/PlanService.js +85 -0
- package/dist/services/mobile/PostCommentService.js +611 -0
- package/dist/services/mobile/PostService.js +640 -0
- package/dist/services/mobile/ProductService.js +360 -0
- package/dist/services/mobile/RedisService.js +16 -0
- package/dist/services/mobile/TransactionService.js +51 -0
- package/dist/services/mobile/UploadService.js +110 -0
- package/dist/services/mobile/UserService.js +128 -0
- package/package.json +73 -0
|
@@ -0,0 +1,87 @@
|
|
|
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.PostModel = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const UserModel_1 = require("./UserModel");
|
|
16
|
+
const CommunityEnum_1 = require("../common/enums/CommunityEnum");
|
|
17
|
+
const CommunityModel_1 = require("./CommunityModel");
|
|
18
|
+
const PostImageModel_1 = require("./PostImageModel");
|
|
19
|
+
const CommentModel_1 = require("./CommentModel");
|
|
20
|
+
let PostModel = class PostModel extends BaseModel_1.BaseModel {
|
|
21
|
+
user_id;
|
|
22
|
+
community_id;
|
|
23
|
+
is_boosted;
|
|
24
|
+
is_sensitive;
|
|
25
|
+
visibility;
|
|
26
|
+
title;
|
|
27
|
+
description;
|
|
28
|
+
user;
|
|
29
|
+
community;
|
|
30
|
+
images;
|
|
31
|
+
comments;
|
|
32
|
+
};
|
|
33
|
+
exports.PostModel = PostModel;
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)(),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], PostModel.prototype, "user_id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)(),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], PostModel.prototype, "community_id", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
44
|
+
__metadata("design:type", Boolean)
|
|
45
|
+
], PostModel.prototype, "is_boosted", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
48
|
+
__metadata("design:type", Boolean)
|
|
49
|
+
], PostModel.prototype, "is_sensitive", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({
|
|
52
|
+
type: "enum",
|
|
53
|
+
enum: CommunityEnum_1.CommunityPostVisibility,
|
|
54
|
+
default: CommunityEnum_1.CommunityPostVisibility.PUBLIC,
|
|
55
|
+
}),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], PostModel.prototype, "visibility", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], PostModel.prototype, "title", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ type: "text" }),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], PostModel.prototype, "description", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.ManyToOne)(() => UserModel_1.UserModel, (user) => user.events),
|
|
68
|
+
(0, typeorm_1.JoinColumn)({ name: "user_id", referencedColumnName: "id" }),
|
|
69
|
+
__metadata("design:type", UserModel_1.UserModel)
|
|
70
|
+
], PostModel.prototype, "user", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.ManyToOne)(() => CommunityModel_1.CommunityModel, (community) => community.posts),
|
|
73
|
+
(0, typeorm_1.JoinColumn)({ name: "community_id", referencedColumnName: "id" }),
|
|
74
|
+
__metadata("design:type", CommunityModel_1.CommunityModel)
|
|
75
|
+
], PostModel.prototype, "community", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, typeorm_1.OneToMany)(() => PostImageModel_1.PostImageModel, (images) => images.post),
|
|
78
|
+
__metadata("design:type", Array)
|
|
79
|
+
], PostModel.prototype, "images", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.OneToMany)(() => CommentModel_1.CommentModel, (comments) => comments.post),
|
|
82
|
+
__metadata("design:type", Array)
|
|
83
|
+
], PostModel.prototype, "comments", void 0);
|
|
84
|
+
exports.PostModel = PostModel = __decorate([
|
|
85
|
+
(0, typeorm_1.Entity)({ name: "posts" }),
|
|
86
|
+
(0, typeorm_1.Index)(["is_sensitive", "user_id", "is_boosted", "visibility"])
|
|
87
|
+
], PostModel);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
import { ProductModel } from "./ProductModel";
|
|
3
|
+
import { UploadModel } from "./UploadModel";
|
|
4
|
+
export declare class ProductImageModel extends BaseModel {
|
|
5
|
+
product_id: number;
|
|
6
|
+
image_id: number;
|
|
7
|
+
product: ProductModel;
|
|
8
|
+
upload: UploadModel;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=ProductImageModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductImageModel.d.ts","sourceRoot":"","sources":["../../src/models/ProductImageModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAE1C,qBAEa,iBAAkB,SAAQ,SAAS;IAE9C,UAAU,EAAG,MAAM,CAAC;IAGpB,QAAQ,EAAG,MAAM,CAAC;IAIlB,OAAO,EAAG,YAAY,CAAC;IAIvB,MAAM,EAAG,WAAW,CAAC;CACtB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.ProductImageModel = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const ProductModel_1 = require("./ProductModel");
|
|
16
|
+
const UploadModel_1 = require("./UploadModel");
|
|
17
|
+
let ProductImageModel = class ProductImageModel extends BaseModel_1.BaseModel {
|
|
18
|
+
product_id;
|
|
19
|
+
image_id;
|
|
20
|
+
product;
|
|
21
|
+
upload;
|
|
22
|
+
};
|
|
23
|
+
exports.ProductImageModel = ProductImageModel;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)(),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], ProductImageModel.prototype, "product_id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)(),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], ProductImageModel.prototype, "image_id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.ManyToOne)(() => ProductModel_1.ProductModel),
|
|
34
|
+
(0, typeorm_1.JoinColumn)({ name: "product_id", referencedColumnName: "id" }),
|
|
35
|
+
__metadata("design:type", ProductModel_1.ProductModel)
|
|
36
|
+
], ProductImageModel.prototype, "product", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.OneToOne)(() => UploadModel_1.UploadModel),
|
|
39
|
+
(0, typeorm_1.JoinColumn)({ name: "image_id", referencedColumnName: "id" }),
|
|
40
|
+
__metadata("design:type", UploadModel_1.UploadModel)
|
|
41
|
+
], ProductImageModel.prototype, "upload", void 0);
|
|
42
|
+
exports.ProductImageModel = ProductImageModel = __decorate([
|
|
43
|
+
(0, typeorm_1.Entity)({ name: "product_images" }),
|
|
44
|
+
(0, typeorm_1.Index)(["product_id", "image_id"])
|
|
45
|
+
], ProductImageModel);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
import { UserModel } from "./UserModel";
|
|
3
|
+
import { ProductStatus } from "../common/enums/MarketplaceEnum";
|
|
4
|
+
import { CategoryModel } from "./CategoryModel";
|
|
5
|
+
import { BusinessModel } from "./BusinessModel";
|
|
6
|
+
export declare class ProductModel extends BaseModel {
|
|
7
|
+
user_id: number;
|
|
8
|
+
category_id: number;
|
|
9
|
+
business_id: number;
|
|
10
|
+
location: any;
|
|
11
|
+
coordinates: string;
|
|
12
|
+
description: string;
|
|
13
|
+
name: string;
|
|
14
|
+
price: string;
|
|
15
|
+
status: ProductStatus;
|
|
16
|
+
user: UserModel;
|
|
17
|
+
category: CategoryModel;
|
|
18
|
+
business: BusinessModel;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=ProductModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductModel.d.ts","sourceRoot":"","sources":["../../src/models/ProductModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,qBAEa,YAAa,SAAQ,SAAS;IAEzC,OAAO,EAAG,MAAM,CAAC;IAGjB,WAAW,EAAG,MAAM,CAAC;IAGrB,WAAW,EAAG,MAAM,CAAC;IAGrB,QAAQ,EAAG,GAAG,CAAC;IAOf,WAAW,EAAG,MAAM,CAAC;IAGrB,WAAW,EAAG,MAAM,CAAC;IAGrB,IAAI,EAAG,MAAM,CAAC;IAGd,KAAK,EAAG,MAAM,CAAC;IAOf,MAAM,EAAG,aAAa,CAAC;IAIvB,IAAI,EAAG,SAAS,CAAC;IAIjB,QAAQ,EAAG,aAAa,CAAC;IAIzB,QAAQ,EAAG,aAAa,CAAC;CAC1B"}
|
|
@@ -0,0 +1,96 @@
|
|
|
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 = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const UserModel_1 = require("./UserModel");
|
|
16
|
+
const MarketplaceEnum_1 = require("../common/enums/MarketplaceEnum");
|
|
17
|
+
const CategoryModel_1 = require("./CategoryModel");
|
|
18
|
+
const BusinessModel_1 = require("./BusinessModel");
|
|
19
|
+
let ProductModel = class ProductModel extends BaseModel_1.BaseModel {
|
|
20
|
+
user_id;
|
|
21
|
+
category_id;
|
|
22
|
+
business_id;
|
|
23
|
+
location;
|
|
24
|
+
coordinates;
|
|
25
|
+
description;
|
|
26
|
+
name;
|
|
27
|
+
price;
|
|
28
|
+
status;
|
|
29
|
+
user;
|
|
30
|
+
category;
|
|
31
|
+
business;
|
|
32
|
+
};
|
|
33
|
+
exports.ProductModel = ProductModel;
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)(),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], ProductModel.prototype, "user_id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)(),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], ProductModel.prototype, "category_id", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)(),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], ProductModel.prototype, "business_id", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: "jsonb" }),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], ProductModel.prototype, "location", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({
|
|
52
|
+
type: "geography",
|
|
53
|
+
spatialFeatureType: "Point",
|
|
54
|
+
srid: 4326,
|
|
55
|
+
}),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], ProductModel.prototype, "coordinates", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ type: "text" }),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], ProductModel.prototype, "description", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)(),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], ProductModel.prototype, "name", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({ type: "decimal" }),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], ProductModel.prototype, "price", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.Column)({
|
|
72
|
+
type: "enum",
|
|
73
|
+
enum: MarketplaceEnum_1.ProductStatus,
|
|
74
|
+
default: MarketplaceEnum_1.ProductStatus.PUBLISHED
|
|
75
|
+
}),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], ProductModel.prototype, "status", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.ManyToOne)(() => UserModel_1.UserModel),
|
|
80
|
+
(0, typeorm_1.JoinColumn)({ name: "user_id", referencedColumnName: "id" }),
|
|
81
|
+
__metadata("design:type", UserModel_1.UserModel)
|
|
82
|
+
], ProductModel.prototype, "user", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.ManyToOne)(() => CategoryModel_1.CategoryModel),
|
|
85
|
+
(0, typeorm_1.JoinColumn)({ name: "category_id", referencedColumnName: "id" }),
|
|
86
|
+
__metadata("design:type", CategoryModel_1.CategoryModel)
|
|
87
|
+
], ProductModel.prototype, "category", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.ManyToOne)(() => BusinessModel_1.BusinessModel),
|
|
90
|
+
(0, typeorm_1.JoinColumn)({ name: "business_id", referencedColumnName: "id" }),
|
|
91
|
+
__metadata("design:type", BusinessModel_1.BusinessModel)
|
|
92
|
+
], ProductModel.prototype, "business", void 0);
|
|
93
|
+
exports.ProductModel = ProductModel = __decorate([
|
|
94
|
+
(0, typeorm_1.Entity)({ name: "products" }),
|
|
95
|
+
(0, typeorm_1.Index)(["category_id", "user_id"])
|
|
96
|
+
], ProductModel);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReviewModel.d.ts","sourceRoot":"","sources":["../../src/models/ReviewModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,qBAGa,WAAY,SAAQ,SAAS;IAExC,OAAO,EAAG,MAAM,CAAC;IAGjB,MAAM,EAAG,MAAM,CAAC;IAGhB,WAAW,CAAC,EAAE,MAAM,CAAC;CAKtB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
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.ReviewModel = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let ReviewModel = class ReviewModel extends BaseModel_1.BaseModel {
|
|
16
|
+
user_id;
|
|
17
|
+
rating;
|
|
18
|
+
review_body;
|
|
19
|
+
};
|
|
20
|
+
exports.ReviewModel = ReviewModel;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.Column)(),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], ReviewModel.prototype, "user_id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)(),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], ReviewModel.prototype, "rating", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], ReviewModel.prototype, "review_body", void 0);
|
|
33
|
+
exports.ReviewModel = ReviewModel = __decorate([
|
|
34
|
+
(0, typeorm_1.Entity)({ name: "reviews" }),
|
|
35
|
+
(0, typeorm_1.Index)(["user_id"])
|
|
36
|
+
], ReviewModel);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
import { UserModel } from "./UserModel";
|
|
3
|
+
import { UploadModel } from "./UploadModel";
|
|
4
|
+
import { BusinessModel } from "./BusinessModel";
|
|
5
|
+
import { BusinessServiceModel } from "./BusinessServiceModel";
|
|
6
|
+
import { CategoryModel } from "./CategoryModel";
|
|
7
|
+
export declare class ServiceProviderModel extends BaseModel {
|
|
8
|
+
name: string;
|
|
9
|
+
user_id: number;
|
|
10
|
+
business_id: number;
|
|
11
|
+
category_id: number;
|
|
12
|
+
years_of_experience: number;
|
|
13
|
+
profile_image_id?: number;
|
|
14
|
+
description: string;
|
|
15
|
+
location: any;
|
|
16
|
+
coordinates: string;
|
|
17
|
+
user: UserModel;
|
|
18
|
+
category: CategoryModel;
|
|
19
|
+
profile_image?: UploadModel;
|
|
20
|
+
business: BusinessModel;
|
|
21
|
+
services?: BusinessServiceModel[];
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=ServiceProviderModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServiceProviderModel.d.ts","sourceRoot":"","sources":["../../src/models/ServiceProviderModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,qBACa,oBAAqB,SAAQ,SAAS;IAEjD,IAAI,EAAG,MAAM,CAAC;IAGd,OAAO,EAAG,MAAM,CAAC;IAGjB,WAAW,EAAG,MAAM,CAAC;IAGrB,WAAW,EAAG,MAAM,CAAC;IAGrB,mBAAmB,EAAG,MAAM,CAAC;IAG7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAG1B,WAAW,EAAG,MAAM,CAAC;IAGrB,QAAQ,EAAG,GAAG,CAAC;IAOf,WAAW,EAAG,MAAM,CAAC;IAIrB,IAAI,EAAG,SAAS,CAAC;IAIjB,QAAQ,EAAG,aAAa,CAAC;IASzB,aAAa,CAAC,EAAE,WAAW,CAAC;IAI5B,QAAQ,EAAG,aAAa,CAAC;IAQzB,QAAQ,CAAC,EAAE,oBAAoB,EAAE,CAAC;CACnC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
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.ServiceProviderModel = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const UserModel_1 = require("./UserModel");
|
|
16
|
+
const UploadModel_1 = require("./UploadModel");
|
|
17
|
+
const BusinessModel_1 = require("./BusinessModel");
|
|
18
|
+
const BusinessServiceModel_1 = require("./BusinessServiceModel");
|
|
19
|
+
const CategoryModel_1 = require("./CategoryModel");
|
|
20
|
+
let ServiceProviderModel = class ServiceProviderModel extends BaseModel_1.BaseModel {
|
|
21
|
+
name;
|
|
22
|
+
user_id;
|
|
23
|
+
business_id;
|
|
24
|
+
category_id;
|
|
25
|
+
years_of_experience;
|
|
26
|
+
profile_image_id;
|
|
27
|
+
description;
|
|
28
|
+
location;
|
|
29
|
+
coordinates;
|
|
30
|
+
user;
|
|
31
|
+
category;
|
|
32
|
+
profile_image;
|
|
33
|
+
business;
|
|
34
|
+
services;
|
|
35
|
+
};
|
|
36
|
+
exports.ServiceProviderModel = ServiceProviderModel;
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], ServiceProviderModel.prototype, "name", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)(),
|
|
43
|
+
__metadata("design:type", Number)
|
|
44
|
+
], ServiceProviderModel.prototype, "user_id", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)(),
|
|
47
|
+
__metadata("design:type", Number)
|
|
48
|
+
], ServiceProviderModel.prototype, "business_id", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)(),
|
|
51
|
+
__metadata("design:type", Number)
|
|
52
|
+
], ServiceProviderModel.prototype, "category_id", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)(),
|
|
55
|
+
__metadata("design:type", Number)
|
|
56
|
+
], ServiceProviderModel.prototype, "years_of_experience", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
59
|
+
__metadata("design:type", Number)
|
|
60
|
+
], ServiceProviderModel.prototype, "profile_image_id", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ type: "text" }),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], ServiceProviderModel.prototype, "description", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: "jsonb" }),
|
|
67
|
+
__metadata("design:type", Object)
|
|
68
|
+
], ServiceProviderModel.prototype, "location", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({
|
|
71
|
+
type: "geography",
|
|
72
|
+
spatialFeatureType: "Point",
|
|
73
|
+
srid: 4326,
|
|
74
|
+
}),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], ServiceProviderModel.prototype, "coordinates", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.ManyToOne)(() => UserModel_1.UserModel),
|
|
79
|
+
(0, typeorm_1.JoinColumn)({ name: "user_id", referencedColumnName: "id" }),
|
|
80
|
+
__metadata("design:type", UserModel_1.UserModel)
|
|
81
|
+
], ServiceProviderModel.prototype, "user", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, typeorm_1.ManyToOne)(() => CategoryModel_1.CategoryModel),
|
|
84
|
+
(0, typeorm_1.JoinColumn)({ name: "category_id", referencedColumnName: "id" }),
|
|
85
|
+
__metadata("design:type", CategoryModel_1.CategoryModel)
|
|
86
|
+
], ServiceProviderModel.prototype, "category", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typeorm_1.OneToOne)(() => UploadModel_1.UploadModel, (upload) => upload.service_provider_image, {
|
|
89
|
+
nullable: true,
|
|
90
|
+
onDelete: 'SET NULL',
|
|
91
|
+
}),
|
|
92
|
+
(0, typeorm_1.JoinColumn)({ name: "profile_image_id", referencedColumnName: "id" }),
|
|
93
|
+
__metadata("design:type", UploadModel_1.UploadModel)
|
|
94
|
+
], ServiceProviderModel.prototype, "profile_image", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, typeorm_1.ManyToOne)(() => BusinessModel_1.BusinessModel),
|
|
97
|
+
(0, typeorm_1.JoinColumn)({ name: "business_id", referencedColumnName: "id" }),
|
|
98
|
+
__metadata("design:type", BusinessModel_1.BusinessModel)
|
|
99
|
+
], ServiceProviderModel.prototype, "business", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, typeorm_1.OneToMany)(() => BusinessServiceModel_1.BusinessServiceModel, (services) => services.provider_info, {
|
|
102
|
+
onDelete: "SET NULL",
|
|
103
|
+
onUpdate: "CASCADE",
|
|
104
|
+
}),
|
|
105
|
+
__metadata("design:type", Array)
|
|
106
|
+
], ServiceProviderModel.prototype, "services", void 0);
|
|
107
|
+
exports.ServiceProviderModel = ServiceProviderModel = __decorate([
|
|
108
|
+
(0, typeorm_1.Entity)({ name: "service_providers" })
|
|
109
|
+
], ServiceProviderModel);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SessionModel.d.ts","sourceRoot":"","sources":["../../src/models/SessionModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,qBAEa,YAAa,SAAQ,SAAS;IAEzC,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,OAAO,EAAG,GAAG,CAAC;IAMd,YAAY,EAAG,YAAY,CAAC;CAM7B"}
|
|
@@ -0,0 +1,40 @@
|
|
|
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.SessionModel = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const enums_1 = require("../common/enums");
|
|
16
|
+
let SessionModel = class SessionModel extends BaseModel_1.BaseModel {
|
|
17
|
+
user_id;
|
|
18
|
+
payload;
|
|
19
|
+
session_type;
|
|
20
|
+
};
|
|
21
|
+
exports.SessionModel = SessionModel;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
24
|
+
__metadata("design:type", Number)
|
|
25
|
+
], SessionModel.prototype, "user_id", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ type: "jsonb" }),
|
|
28
|
+
__metadata("design:type", Object)
|
|
29
|
+
], SessionModel.prototype, "payload", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({
|
|
32
|
+
type: "enum",
|
|
33
|
+
enum: enums_1.SESSION_TYPE,
|
|
34
|
+
}),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], SessionModel.prototype, "session_type", void 0);
|
|
37
|
+
exports.SessionModel = SessionModel = __decorate([
|
|
38
|
+
(0, typeorm_1.Entity)({ name: "sessions" }),
|
|
39
|
+
(0, typeorm_1.Index)(["user_id"])
|
|
40
|
+
], SessionModel);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpeechModel.d.ts","sourceRoot":"","sources":["../../src/models/SpeechModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAEpD,qBACa,WAAY,SAAQ,SAAS;IAExC,IAAI,EAAG,MAAM,CAAC;IAId,IAAI,EAAG,gBAAgB,CAAC;CACzB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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.SpeechModel = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const UserProfileModel_1 = require("./UserProfileModel");
|
|
16
|
+
let SpeechModel = class SpeechModel extends BaseModel_1.BaseModel {
|
|
17
|
+
name;
|
|
18
|
+
user;
|
|
19
|
+
};
|
|
20
|
+
exports.SpeechModel = SpeechModel;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.Column)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], SpeechModel.prototype, "name", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.ManyToOne)(() => UserProfileModel_1.UserProfileModel, (user) => user.diagnosis_level),
|
|
27
|
+
(0, typeorm_1.JoinColumn)({ name: "user_id", referencedColumnName: "id" }),
|
|
28
|
+
__metadata("design:type", UserProfileModel_1.UserProfileModel)
|
|
29
|
+
], SpeechModel.prototype, "user", void 0);
|
|
30
|
+
exports.SpeechModel = SpeechModel = __decorate([
|
|
31
|
+
(0, typeorm_1.Entity)({ name: "speeches" })
|
|
32
|
+
], SpeechModel);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
import { PAYMENT_PROVIDER } from "../common/enums";
|
|
3
|
+
export declare class SubscriptionHistoryModel extends BaseModel {
|
|
4
|
+
amount: number;
|
|
5
|
+
plan_id: number;
|
|
6
|
+
user_id: number;
|
|
7
|
+
subscription_payment_id: string;
|
|
8
|
+
short_description: string;
|
|
9
|
+
payment_provider: PAYMENT_PROVIDER;
|
|
10
|
+
metadata?: any;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=SubscriptionHistoryModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubscriptionHistoryModel.d.ts","sourceRoot":"","sources":["../../src/models/SubscriptionHistoryModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,qBAEa,wBAAyB,SAAQ,SAAS;IAErD,MAAM,EAAG,MAAM,CAAC;IAGhB,OAAO,EAAG,MAAM,CAAC;IAGjB,OAAO,EAAG,MAAM,CAAC;IAGjB,uBAAuB,EAAG,MAAM,CAAC;IAGjC,iBAAiB,EAAG,MAAM,CAAC;IAM3B,gBAAgB,EAAG,gBAAgB,CAAC;IAGpC,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
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.SubscriptionHistoryModel = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const enums_1 = require("../common/enums");
|
|
16
|
+
let SubscriptionHistoryModel = class SubscriptionHistoryModel extends BaseModel_1.BaseModel {
|
|
17
|
+
amount;
|
|
18
|
+
plan_id;
|
|
19
|
+
user_id;
|
|
20
|
+
subscription_payment_id;
|
|
21
|
+
short_description;
|
|
22
|
+
payment_provider;
|
|
23
|
+
metadata;
|
|
24
|
+
};
|
|
25
|
+
exports.SubscriptionHistoryModel = SubscriptionHistoryModel;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)("decimal"),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], SubscriptionHistoryModel.prototype, "amount", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)(),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], SubscriptionHistoryModel.prototype, "plan_id", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)(),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], SubscriptionHistoryModel.prototype, "user_id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], SubscriptionHistoryModel.prototype, "subscription_payment_id", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], SubscriptionHistoryModel.prototype, "short_description", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({
|
|
48
|
+
type: "enum",
|
|
49
|
+
enum: enums_1.PAYMENT_PROVIDER
|
|
50
|
+
}),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], SubscriptionHistoryModel.prototype, "payment_provider", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: "jsonb", nullable: true }),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], SubscriptionHistoryModel.prototype, "metadata", void 0);
|
|
57
|
+
exports.SubscriptionHistoryModel = SubscriptionHistoryModel = __decorate([
|
|
58
|
+
(0, typeorm_1.Entity)({ name: "subscription_histories" }),
|
|
59
|
+
(0, typeorm_1.Index)(["user_id", "plan_id", "subscription_payment_id"])
|
|
60
|
+
], SubscriptionHistoryModel);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseModel } from "./BaseModel";
|
|
2
|
+
import { UserModel } from "./UserModel";
|
|
3
|
+
import { STATUS } from "../common/enums";
|
|
4
|
+
export declare class SubscriptionModel extends BaseModel {
|
|
5
|
+
user_id: number;
|
|
6
|
+
user: UserModel;
|
|
7
|
+
payment_ref: string;
|
|
8
|
+
plan_id: number;
|
|
9
|
+
status: STATUS;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=SubscriptionModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubscriptionModel.d.ts","sourceRoot":"","sources":["../../src/models/SubscriptionModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,qBAGa,iBAAkB,SAAQ,SAAS;IAE9C,OAAO,EAAG,MAAM,CAAC;IAIjB,IAAI,EAAG,SAAS,CAAC;IAGjB,WAAW,EAAG,MAAM,CAAC;IAGrB,OAAO,EAAG,MAAM,CAAC;IAOjB,MAAM,EAAG,MAAM,CAAC;CACjB"}
|