This commit is contained in:
mahyargdz
2025-09-14 15:15:03 +03:30
commit be82059172
534 changed files with 51310 additions and 0 deletions
+286
View File
@@ -0,0 +1,286 @@
import { AsyncContainerModule } from "inversify";
import { IOCTYPES } from "./ioc.types";
import { AboutUsRepo, CreateAboutUsRepo } from "../modules/about-us/aboutUs.repository";
import { AboutUsService } from "../modules/about-us/aboutUs.service";
import {
AddressRepo,
CityRepo,
ProvinceRepo,
createAddressRepo,
createCityRepo,
createProvinceRepo,
} from "../modules/address/address.repository";
import { AddressService } from "../modules/address/address.service";
import { AdminService } from "../modules/admin/admin.service";
import { AdminRepository, createAdminRepository } from "../modules/admin/repository/admin";
import { ContractRepository, createContractRepository } from "../modules/admin/repository/contract";
import { BannerRepository, SliderRepository, createBannerRepo, createSliderRepo } from "../modules/admin/repository/media";
import { PermissionRepository, createPermissionRepo } from "../modules/admin/repository/permission";
import { RoleRepository, createRoleRepo } from "../modules/admin/repository/role";
import { AuthService } from "../modules/auth/auth.service";
import { BlogService } from "../modules/blog/blog.service";
import { BlogRepository, createBlogRepo } from "../modules/blog/repository/blog";
import { BlogCategoryRepo, createBlogCategoryRepo } from "../modules/blog/repository/blogCategory";
import { BrandRepository, createBrandRepository } from "../modules/brand/brand.repository";
import { BrandService } from "../modules/brand/brand.service";
import {
CancelOrderItemRepo,
CancelOrderRepo,
CancelReasonRepo,
createCancelOrderItemRepo,
createCancelOrderRepo,
createCancelReasonRepo,
} from "../modules/cancel/cancel.repository";
import { CancelService } from "../modules/cancel/cancel.service";
import { CartRepository, CartShipItemRepo, createCartRepo, createCartShipItemRepo } from "../modules/cart/cart.repository";
import { CartService } from "../modules/cart/cart.service";
import {
AttributeValueRepo,
CategoryAttributeRepo,
CategoryRepository,
ColorRepository,
MeterageRepository,
SizeRepository,
createAttributeValueRepo,
createCategoryAttributeRepo,
createCategoryRepo,
createColorRepo,
createMeterageRepo,
createSizeRepo,
} from "../modules/category/category.repository";
import { CategoryService } from "../modules/category/category.service";
import { ChatGateway } from "../modules/chat/chat.gateway";
import { ChatService } from "../modules/chat/chat.service";
import { ChatRepo, createChatRepo } from "../modules/chat/repository/chat.repository";
import { ChatMessageRepo, createChatMessageRepo } from "../modules/chat/repository/message.repository";
import { WsAuthService } from "../modules/chat/wsAuth.service";
import { ContactUsRepo, CreateContactUsRepo } from "../modules/contact-us/contactUs.repository";
import { ContactUsService } from "../modules/contact-us/contactUs.service";
import { CouponRepo, CouponUsageRepo, createCouponRepo, createCouponUsageRepo } from "../modules/Coupon/coupon.repository";
import { CouponService } from "../modules/Coupon/coupon.service";
import { FaqRepo, createFaqRepo } from "../modules/faq/faq.repository";
import { FaqService } from "../modules/faq/faq.service";
import { FineService } from "../modules/fine/fine.service";
import { FineRepo, createFineRepo } from "../modules/fine/repository/fine.repository";
import { FineRuleRepo, createFineRuleRepo } from "../modules/fine/repository/fineRule.repository";
import { AsanPardakhtGateway } from "../modules/IPG/gateways/asanpardakht";
import { ZarinPalGateway } from "../modules/IPG/gateways/zarinpal";
import { PaymentGateway } from "../modules/IPG/PaymentGateway";
import { JobService } from "../modules/job/job.service";
import { JobRepo, createJobRepo } from "../modules/job/repository/job.repo";
import { ResumeRepo, createResumeRepo } from "../modules/job/repository/resume.repo";
import { LandingService } from "../modules/landing/landing.service";
import { LearningService } from "../modules/learning/learning.service";
import { CreateLearningRepo, LearningRepo } from "../modules/learning/repository/learning";
import { CreateLearningCategoryRepo, LearningCategoryRepo } from "../modules/learning/repository/learningCategory";
import { CreateLearningProgressRepo, LearningProgressRepo } from "../modules/learning/repository/learningProgress";
import { MediaService } from "../modules/media/media.service";
import { CreateNewsletterRepo, NewsletterRepo } from "../modules/newsletter/newsletter.repository";
import { NewsletterService } from "../modules/newsletter/newsletter.service";
import { NotificationRepo, createNotificationRepo } from "../modules/notification/notification.repository";
import { NotificationService } from "../modules/notification/notification.service";
import { OrderItemRepo, OrderRepository, createOrderItemRepo, createOrderRepo } from "../modules/order/order.repository";
import { OrderService } from "../modules/order/order.service";
import {
CartPaymentRepository,
PRPaymentRepository,
PaymentMethodRepo,
createCartPaymentRepo,
createPRPaymentRepo,
createPaymentMethodRepo,
} from "../modules/payment/payment.repository";
import { PaymentService } from "../modules/payment/providers/payment.service";
import { PRPaymentService } from "../modules/payment/providers/PR-payment.service";
import { PricingRepository, createPricingRepo } from "../modules/pricing/pricing.repository";
import { PricingService } from "../modules/pricing/pricing.service";
import { ProductRequestService } from "../modules/product/providers/product-request.service";
import { ProductService } from "../modules/product/providers/product.service";
import { CommentRepository, createCommentRepo } from "../modules/product/Repository/comment";
import { IncredibleOffersRepo, createIncredibleOffersRepo } from "../modules/product/Repository/incredibleOffers";
import { PopularProductRepo, createPopularProductRepo } from "../modules/product/Repository/popularProduct";
import { PriceHistoryRepo, createPriceHistoryRepo } from "../modules/product/Repository/pricehistory";
import { ProductRepository, createProductRepo } from "../modules/product/Repository/product";
import { ProductAdRepo, createProductAdRepo } from "../modules/product/Repository/productAd";
import { ProductObserveRepo, createProductObserveRepo } from "../modules/product/Repository/productObserve";
import { ProductReportRepo, createProductReportRepo } from "../modules/product/Repository/productReport";
import { ProductRequestRepo, createProductRequestRepo } from "../modules/product/Repository/productRequest";
import { ProductVariantRepository, createProductVariantRepo } from "../modules/product/Repository/productVarinat";
import { QuestionRepository, createQuestionRepo } from "../modules/product/Repository/question";
import { ReportQuestionRepo, createReportQuestionRepo } from "../modules/product/Repository/reportQuestion";
import {
ReturnOrderItemRepo,
ReturnOrderRepo,
ReturnReasonRepo,
createReturnOrderItemRepo,
createReturnOrderRepo,
createReturnReasonRepo,
} from "../modules/return/return.repository";
import { ReturnService } from "../modules/return/return.service";
import { DocumentTypeRepo, createDocumentTypeRepo } from "../modules/seller/repository/documentType.repository";
import { LegalSellerRepo, createLegalSellerRepo } from "../modules/seller/repository/legalSeller.repository";
import { RealSellerRepo, createRealSellerRepo } from "../modules/seller/repository/realSeller.repository";
import { SellerContractRepo, createSellerContractRepo } from "../modules/seller/repository/sellerContract.repository";
import { SellerDocumentRepo, createSellerDocumentRepo } from "../modules/seller/repository/sellerDocument.repository";
import { SellerStatusRepo, createSellerStatusRepo } from "../modules/seller/repository/sellerStatus.repository";
import { WholesaleRequestRepo, createWholesaleRequestRepo } from "../modules/seller/repository/wholesaleRequest.repositroy";
import { SellerRepository, createSellerRepository } from "../modules/seller/seller.repository";
import { SellerService } from "../modules/seller/seller.service";
import { ShipmentRepository, createShipmentRepository } from "../modules/shipment/shipment.repository";
import { ShipmentService } from "../modules/shipment/shipment.service";
import { ShopRepo, createShopRepo } from "../modules/shop/shop.repository";
import { ShopService } from "../modules/shop/shop.service";
import { CreateSiteSettingRepo, SiteSettingRepo } from "../modules/site-setting/siteSetting.repository";
import { SiteSettingService } from "../modules/site-setting/siteSetting.service";
import { TicketRepository, createTicketRepo } from "../modules/ticket/repository/ticket";
import { TicketCategoryRepository, createTicketCategoryRepo } from "../modules/ticket/repository/ticketCategory";
import { TicketMessageRepository, createTicketMessageRepo } from "../modules/ticket/repository/ticketMessage";
import { TicketService } from "../modules/ticket/ticket.service";
import { TokenRepository, createTokenRepository } from "../modules/token/token.repository";
import { TokenService } from "../modules/token/token.service";
import { UserRepository, WishlistRepo, createUserRepository, createWishlistRepo } from "../modules/user/user.repository";
import { UserService } from "../modules/user/user.service";
import { TransactionRepo, createTransactionRepo } from "../modules/wallet/repository/transaction.repo";
import { WalletRepo, createWalletRepo } from "../modules/wallet/repository/wallet.repo";
import { WithdrawalRepo, createWithdrawalRepo } from "../modules/wallet/repository/withdrawal.repo";
import { WalletService } from "../modules/wallet/wallet.service";
import { WarrantyRepository, createWarrantyRepository } from "../modules/warranty/warranty.repository";
import { WarrantyService } from "../modules/warranty/warranty.service";
import { CacheService } from "../utils/cache.service";
import { PassportAuth } from "../utils/passport.service";
import { RedisService } from "../utils/redis.service";
const containerModules = new AsyncContainerModule(async (bind) => {
bind(IOCTYPES.PassportAuth).to(PassportAuth).inSingletonScope();
// bind(IOCTYPES.PassportAuth).to(PassportAuth).inSingletonScope();
bind<PaymentGateway>(IOCTYPES.PaymentGateway).to(PaymentGateway).inSingletonScope();
bind<ZarinPalGateway>(IOCTYPES.ZarinPalGateway).to(ZarinPalGateway).inSingletonScope();
bind<AsanPardakhtGateway>(IOCTYPES.AsanPardakhtGateway).to(AsanPardakhtGateway).inSingletonScope();
// #region services
bind<CategoryService>(IOCTYPES.CategoryService).to(CategoryService).inSingletonScope();
bind<AuthService>(IOCTYPES.AuthService).to(AuthService).inSingletonScope();
bind<ChatGateway>(IOCTYPES.ChatGateway).to(ChatGateway).inSingletonScope();
bind<ChatService>(IOCTYPES.ChatService).to(ChatService).inSingletonScope();
bind<WsAuthService>(IOCTYPES.WsAuthService).to(WsAuthService).inSingletonScope();
bind<TokenService>(IOCTYPES.TokenService).to(TokenService).inSingletonScope();
bind<SellerService>(IOCTYPES.SellerService).to(SellerService).inSingletonScope();
bind<UserService>(IOCTYPES.UserService).to(UserService).inSingletonScope();
bind<AdminService>(IOCTYPES.AdminService).to(AdminService).inSingletonScope();
bind<ProductService>(IOCTYPES.ProductService).to(ProductService).inSingletonScope();
bind<ProductRequestService>(IOCTYPES.ProductRequestService).to(ProductRequestService).inSingletonScope();
bind<BrandService>(IOCTYPES.BrandService).to(BrandService).inSingletonScope();
bind<WarrantyService>(IOCTYPES.WarrantyService).to(WarrantyService).inSingletonScope();
bind<ShipmentService>(IOCTYPES.ShipmentService).to(ShipmentService).inSingletonScope();
bind<CartService>(IOCTYPES.CartService).to(CartService).inSingletonScope();
bind<PaymentService>(IOCTYPES.PaymentService).to(PaymentService).inSingletonScope();
bind<PRPaymentService>(IOCTYPES.PRPaymentService).to(PRPaymentService).inSingletonScope();
bind<OrderService>(IOCTYPES.OrderService).to(OrderService).inSingletonScope();
bind<CouponService>(IOCTYPES.CouponService).to(CouponService).inSingletonScope();
bind<LandingService>(IOCTYPES.LandingService).to(LandingService).inSingletonScope();
bind<BlogService>(IOCTYPES.BlogService).to(BlogService).inSingletonScope();
bind<TicketService>(IOCTYPES.TicketService).to(TicketService).inSingletonScope();
bind<WalletService>(IOCTYPES.WalletService).to(WalletService).inSingletonScope();
bind<JobService>(IOCTYPES.JobService).to(JobService).inSingletonScope();
bind<FaqService>(IOCTYPES.FaqService).to(FaqService).inSingletonScope();
bind<SiteSettingService>(IOCTYPES.SiteSettingService).to(SiteSettingService).inSingletonScope();
bind<NotificationService>(IOCTYPES.NotificationService).to(NotificationService).inSingletonScope();
bind<ReturnService>(IOCTYPES.ReturnService).to(ReturnService).inSingletonScope();
bind<CancelService>(IOCTYPES.CancelService).to(CancelService).inSingletonScope();
bind<FineService>(IOCTYPES.FineService).to(FineService).inSingletonScope();
bind<AddressService>(IOCTYPES.AddressService).to(AddressService).inSingletonScope();
bind<ShopService>(IOCTYPES.ShopService).to(ShopService).inSingletonScope();
bind<MediaService>(IOCTYPES.MediaService).to(MediaService).inSingletonScope();
bind<ContactUsService>(IOCTYPES.ContactUsService).to(ContactUsService).inSingletonScope();
bind<AboutUsService>(IOCTYPES.AboutUsService).to(AboutUsService).inSingletonScope();
bind<NewsletterService>(IOCTYPES.NewsletterService).to(NewsletterService).inSingletonScope();
bind<PricingService>(IOCTYPES.PricingService).to(PricingService).inSingletonScope();
bind<LearningService>(IOCTYPES.LearningService).to(LearningService).inSingletonScope();
bind<RedisService>(IOCTYPES.RedisService).to(RedisService).inSingletonScope();
bind<CacheService>(IOCTYPES.CacheService).to(CacheService).inSingletonScope();
// #endregion
// #region repository
bind<CategoryRepository>(IOCTYPES.CategoryRepository).toDynamicValue(createCategoryRepo).inSingletonScope();
bind<CategoryAttributeRepo>(IOCTYPES.CategoryAttributeRepository).toDynamicValue(createCategoryAttributeRepo).inSingletonScope();
bind<AttributeValueRepo>(IOCTYPES.AttributeValueRepository).toDynamicValue(createAttributeValueRepo).inSingletonScope();
bind<TokenRepository>(IOCTYPES.TokenRepository).toDynamicValue(createTokenRepository).inSingletonScope();
bind<UserRepository>(IOCTYPES.UserRepository).toDynamicValue(createUserRepository).inSingletonScope();
bind<AdminRepository>(IOCTYPES.AdminRepository).toDynamicValue(createAdminRepository).inSingletonScope();
bind<SellerRepository>(IOCTYPES.SellerRepository).toDynamicValue(createSellerRepository).inSingletonScope();
bind<LegalSellerRepo>(IOCTYPES.LegalSellerRepo).toDynamicValue(createLegalSellerRepo).inSingletonScope();
bind<RealSellerRepo>(IOCTYPES.RealSellerRepo).toDynamicValue(createRealSellerRepo).inSingletonScope();
bind<SellerDocumentRepo>(IOCTYPES.SellerDocumentRepo).toDynamicValue(createSellerDocumentRepo).inSingletonScope();
bind<SellerContractRepo>(IOCTYPES.SellerContractRepo).toDynamicValue(createSellerContractRepo).inSingletonScope();
bind<SellerStatusRepo>(IOCTYPES.SellerStatusRepo).toDynamicValue(createSellerStatusRepo).inSingletonScope();
bind<DocumentTypeRepo>(IOCTYPES.DocumentTypeRepo).toDynamicValue(createDocumentTypeRepo).inSingletonScope();
bind<BrandRepository>(IOCTYPES.BrandRepository).toDynamicValue(createBrandRepository).inSingletonScope();
bind<WarrantyRepository>(IOCTYPES.WarrantyRepository).toDynamicValue(createWarrantyRepository).inSingletonScope();
bind<ProductRepository>(IOCTYPES.ProductRepository).toDynamicValue(createProductRepo).inSingletonScope();
bind<ShipmentRepository>(IOCTYPES.ShipmentRepository).toDynamicValue(createShipmentRepository).inSingletonScope();
bind<ProductVariantRepository>(IOCTYPES.ProductVariantRepository).toDynamicValue(createProductVariantRepo).inSingletonScope();
bind<ColorRepository>(IOCTYPES.ColorRepository).toDynamicValue(createColorRepo).inSingletonScope();
bind<SizeRepository>(IOCTYPES.SizeRepository).toDynamicValue(createSizeRepo).inSingletonScope();
bind<MeterageRepository>(IOCTYPES.MeterageRepository).toDynamicValue(createMeterageRepo).inSingletonScope();
bind<QuestionRepository>(IOCTYPES.QuestionRepository).toDynamicValue(createQuestionRepo).inSingletonScope();
bind<CommentRepository>(IOCTYPES.CommentRepository).toDynamicValue(createCommentRepo).inSingletonScope();
bind<CartRepository>(IOCTYPES.CartRepository).toDynamicValue(createCartRepo).inSingletonScope();
bind<CartPaymentRepository>(IOCTYPES.CartPaymentRepo).toDynamicValue(createCartPaymentRepo).inSingletonScope();
bind<PRPaymentRepository>(IOCTYPES.PRPaymentRepo).toDynamicValue(createPRPaymentRepo).inSingletonScope();
bind<OrderRepository>(IOCTYPES.OrderRepository).toDynamicValue(createOrderRepo).inSingletonScope();
bind<OrderItemRepo>(IOCTYPES.OrderItemRepo).toDynamicValue(createOrderItemRepo).inSingletonScope();
bind<ProductRequestRepo>(IOCTYPES.ProductRequestRepo).toDynamicValue(createProductRequestRepo).inSingletonScope();
bind<PricingRepository>(IOCTYPES.PricingRepo).toDynamicValue(createPricingRepo).inSingletonScope();
bind<CartShipItemRepo>(IOCTYPES.CartShipItemRepo).toDynamicValue(createCartShipItemRepo).inSingletonScope();
bind<PaymentMethodRepo>(IOCTYPES.PaymentMethodRepo).toDynamicValue(createPaymentMethodRepo).inSingletonScope();
bind<CouponRepo>(IOCTYPES.CouponRepo).toDynamicValue(createCouponRepo).inSingletonScope();
bind<CouponUsageRepo>(IOCTYPES.CouponUsageRepo).toDynamicValue(createCouponUsageRepo).inSingletonScope();
bind<SliderRepository>(IOCTYPES.SliderRepository).toDynamicValue(createSliderRepo).inSingletonScope();
bind<BannerRepository>(IOCTYPES.BannerRepository).toDynamicValue(createBannerRepo).inSingletonScope();
bind<ReportQuestionRepo>(IOCTYPES.ReportQuestionRepo).toDynamicValue(createReportQuestionRepo).inSingletonScope();
bind<ContractRepository>(IOCTYPES.ContractRepository).toDynamicValue(createContractRepository).inSingletonScope();
bind<ProductReportRepo>(IOCTYPES.ProductReportRepo).toDynamicValue(createProductReportRepo).inSingletonScope();
bind<PriceHistoryRepo>(IOCTYPES.PriceHistoryRepo).toDynamicValue(createPriceHistoryRepo).inSingletonScope();
bind<ProductAdRepo>(IOCTYPES.ProductAdRepo).toDynamicValue(createProductAdRepo).inSingletonScope();
bind<PopularProductRepo>(IOCTYPES.PopularProductRepo).toDynamicValue(createPopularProductRepo).inSingletonScope();
bind<IncredibleOffersRepo>(IOCTYPES.IncredibleOffersRepo).toDynamicValue(createIncredibleOffersRepo).inSingletonScope();
bind<ProductObserveRepo>(IOCTYPES.ProductObserveRepo).toDynamicValue(createProductObserveRepo).inSingletonScope();
bind<BlogRepository>(IOCTYPES.BlogRepository).toDynamicValue(createBlogRepo).inSingletonScope();
bind<BlogCategoryRepo>(IOCTYPES.BlogCategoryRepo).toDynamicValue(createBlogCategoryRepo).inSingletonScope();
bind<LearningRepo>(IOCTYPES.LearningRepo).toDynamicValue(CreateLearningRepo).inSingletonScope();
bind<LearningProgressRepo>(IOCTYPES.LearningProgressRepo).toDynamicValue(CreateLearningProgressRepo).inSingletonScope();
bind<LearningCategoryRepo>(IOCTYPES.LearningCategoryRepo).toDynamicValue(CreateLearningCategoryRepo).inSingletonScope();
bind<RoleRepository>(IOCTYPES.RoleRepository).toDynamicValue(createRoleRepo).inSingletonScope();
bind<PermissionRepository>(IOCTYPES.PermissionRepository).toDynamicValue(createPermissionRepo).inSingletonScope();
bind<TicketRepository>(IOCTYPES.TicketRepository).toDynamicValue(createTicketRepo).inSingletonScope();
bind<TicketMessageRepository>(IOCTYPES.TicketMessageRepository).toDynamicValue(createTicketMessageRepo).inSingletonScope();
bind<TicketCategoryRepository>(IOCTYPES.TicketCategoryRepository).toDynamicValue(createTicketCategoryRepo).inSingletonScope();
bind<ChatRepo>(IOCTYPES.ChatRepository).toDynamicValue(createChatRepo).inSingletonScope();
bind<ChatMessageRepo>(IOCTYPES.ChatMessageRepository).toDynamicValue(createChatMessageRepo).inSingletonScope();
bind<WalletRepo>(IOCTYPES.WalletRepo).toDynamicValue(createWalletRepo).inSingletonScope();
bind<TransactionRepo>(IOCTYPES.TransactionRepo).toDynamicValue(createTransactionRepo).inSingletonScope();
bind<WithdrawalRepo>(IOCTYPES.WithdrawalRepo).toDynamicValue(createWithdrawalRepo).inSingletonScope();
bind<WishlistRepo>(IOCTYPES.WishlistRepo).toDynamicValue(createWishlistRepo).inSingletonScope();
bind<JobRepo>(IOCTYPES.JobRepo).toDynamicValue(createJobRepo).inSingletonScope();
bind<ResumeRepo>(IOCTYPES.ResumeRepo).toDynamicValue(createResumeRepo).inSingletonScope();
bind<FaqRepo>(IOCTYPES.FaqRepo).toDynamicValue(createFaqRepo).inSingletonScope();
bind<NotificationRepo>(IOCTYPES.NotificationRepo).toDynamicValue(createNotificationRepo).inSingletonScope();
bind<ReturnOrderRepo>(IOCTYPES.ReturnOrderRepo).toDynamicValue(createReturnOrderRepo).inSingletonScope();
bind<CancelOrderRepo>(IOCTYPES.CancelOrderRepo).toDynamicValue(createCancelOrderRepo).inSingletonScope();
bind<ReturnOrderItemRepo>(IOCTYPES.ReturnOrderItemRepo).toDynamicValue(createReturnOrderItemRepo).inSingletonScope();
bind<CancelOrderItemRepo>(IOCTYPES.CancelOrderItemRepo).toDynamicValue(createCancelOrderItemRepo).inSingletonScope();
bind<ReturnReasonRepo>(IOCTYPES.ReturnReasonRepo).toDynamicValue(createReturnReasonRepo).inSingletonScope();
bind<CancelReasonRepo>(IOCTYPES.CancelReasonRepo).toDynamicValue(createCancelReasonRepo).inSingletonScope();
bind<FineRuleRepo>(IOCTYPES.FineRuleRepo).toDynamicValue(createFineRuleRepo).inSingletonScope();
bind<FineRepo>(IOCTYPES.FineRepo).toDynamicValue(createFineRepo).inSingletonScope();
bind<ShopRepo>(IOCTYPES.ShopRepo).toDynamicValue(createShopRepo).inSingletonScope();
bind<WholesaleRequestRepo>(IOCTYPES.WholesaleRequestRepo).toDynamicValue(createWholesaleRequestRepo).inSingletonScope();
bind<AddressRepo>(IOCTYPES.AddressRepo).toDynamicValue(createAddressRepo).inSingletonScope();
bind<CityRepo>(IOCTYPES.CityRepo).toDynamicValue(createCityRepo).inSingletonScope();
bind<ProvinceRepo>(IOCTYPES.ProvinceRepo).toDynamicValue(createProvinceRepo).inSingletonScope();
bind<ContactUsRepo>(IOCTYPES.ContactUsRepo).toDynamicValue(CreateContactUsRepo).inSingletonScope();
bind<AboutUsRepo>(IOCTYPES.AboutUsRepo).toDynamicValue(CreateAboutUsRepo).inSingletonScope();
bind<SiteSettingRepo>(IOCTYPES.SiteSettingRepo).toDynamicValue(CreateSiteSettingRepo).inSingletonScope();
bind<NewsletterRepo>(IOCTYPES.NewsletterRepo).toDynamicValue(CreateNewsletterRepo).inSingletonScope();
// #endregion
});
export { containerModules };
+136
View File
@@ -0,0 +1,136 @@
export const IOCTYPES = {
//
CustomDecoratorMiddleware: Symbol.for("CustomDecoratorMiddleware"),
// #region service
PassportAuth: Symbol.for("PassportAuth"),
AuthService: Symbol.for("AuthService"),
CategoryService: Symbol.for("CategoryService"),
UserService: Symbol.for("UserService"),
AdminService: Symbol.for("AdminService"),
SellerService: Symbol.for("SellerService"),
SellerStatusRepo: Symbol.for("SellerStatusRepo"),
ProductService: Symbol.for("ProductService"),
SiteSettingService: Symbol.for("SiteSettingService"),
ProductRequestService: Symbol.for("ProductRequestService"),
ShipmentService: Symbol.for("ShipmentService"),
BrandService: Symbol.for("BrandService"),
WarrantyService: Symbol.for("WarrantyService"),
CacheService: Symbol.for("CacheService"),
RedisService: Symbol.for("RedisService"),
TokenService: Symbol.for("TokenService"),
CartService: Symbol.for("CartService"),
PaymentService: Symbol.for("PaymentService"),
PRPaymentService: Symbol.for("PRPaymentService"),
OrderService: Symbol.for("OrderService"),
CouponService: Symbol.for("CouponService"),
LandingService: Symbol.for("LandingService"),
BlogService: Symbol.for("BlogService"),
LearningService: Symbol.for("LearningService"),
TicketService: Symbol.for("TicketService"),
ChatGateway: Symbol.for("ChatGateway"),
ChatService: Symbol.for("ChatService"),
WsAuthService: Symbol.for("WsAuthService"),
WalletService: Symbol.for("WalletService"),
JobService: Symbol.for("JobService"),
FaqService: Symbol.for("FaqService"),
NotificationService: Symbol.for("NotificationService"),
ReturnService: Symbol.for("ReturnService"),
CancelService: Symbol.for("CancelService"),
FineService: Symbol.for("FineService"),
AddressService: Symbol.for("AddressService"),
ShopService: Symbol.for("ShopService"),
MediaService: Symbol.for("MediaService"),
ContactUsService: Symbol.for("ContactUsService"),
AboutUsService: Symbol.for("AboutUsService"),
NewsletterService: Symbol.for("NewsletterService"),
PricingService: Symbol.for("PricingService"),
OrderQueue: Symbol.for("OrderQueue"),
// #endregion
// #region repository
CategoryRepository: Symbol.for("CategoryRepository"),
CategoryAttributeRepository: Symbol.for("CategoryAttributeRepository"),
AttributeValueRepository: Symbol.for("AttributeValueRepository"),
UserRepository: Symbol.for("UserRepository"),
AdminRepository: Symbol.for("AdminRepository"),
SellerRepository: Symbol.for("SellerRepository"),
LegalSellerRepo: Symbol.for("LegalSellerRepo"),
RealSellerRepo: Symbol.for("RealSellerRepo"),
SellerContractRepo: Symbol.for("SellerContractRepo"),
SellerDocumentRepo: Symbol.for("SellerDocumentRepo"),
SellerFinancialRepo: Symbol.for("SellerFinancialRepo"),
DocumentTypeRepo: Symbol.for("DocumentTypeRepo"),
ProductRepository: Symbol.for("ProductRepository"),
ProductVariantRepository: Symbol.for("ProductVariantRepository"),
BrandRepository: Symbol.for("BrandRepository"),
WarrantyRepository: Symbol.for("WarrantyRepository"),
ShipmentRepository: Symbol.for("ShipmentRepository"),
TokenRepository: Symbol.for("TokenRepository"),
ColorRepository: Symbol.for("ColorRepository"),
SizeRepository: Symbol.for("SizeRepository"),
MeterageRepository: Symbol.for("MeterageRepository"),
QuestionRepository: Symbol.for("QuestionRepository"),
CommentRepository: Symbol.for("CommentRepository"),
ProductRequestRepo: Symbol.for("ProductRequestRepo"),
CartRepository: Symbol.for("CartRepository"),
CartShipItemRepo: Symbol.for("CartShipItemRepo"),
CartPaymentRepo: Symbol.for("CartPaymentRepo"),
PricingRepo: Symbol.for("PricingRepo"),
PRPaymentRepo: Symbol.for("PRPaymentRepo"),
PaymentMethodRepo: Symbol.for("PaymentMethodRepo"),
OrderRepository: Symbol.for("OrderRepository"),
OrderItemRepo: Symbol.for("OrderItemRepo"),
CouponRepo: Symbol.for("CouponRepo"),
CouponUsageRepo: Symbol.for("CouponUsageRepo"),
SliderRepository: Symbol.for("SliderRepository"),
BannerRepository: Symbol.for("BannerRepository"),
ProductReportRepo: Symbol.for("ProductReportRepo"),
ReportQuestionRepo: Symbol.for("ReportQuestionRepo"),
PriceHistoryRepo: Symbol.for("PriceHistoryRepo"),
ProductAdRepo: Symbol.for("ProductAdRepo"),
PopularProductRepo: Symbol.for("PopularProductRepo"),
IncredibleOffersRepo: Symbol.for("IncredibleOffersRepo"),
ProductObserveRepo: Symbol.for("ProductObserveRepo"),
BlogRepository: Symbol.for("BlogRepository"),
BlogCategoryRepo: Symbol.for("BlogCategoryRepo"),
LearningRepo: Symbol.for("LearningRepo"),
LearningProgressRepo: Symbol.for("LearningProgressRepo"),
LearningCategoryRepo: Symbol.for("LearningCategoryRepo"),
RoleRepository: Symbol.for("RoleRepository"),
PermissionRepository: Symbol.for("PermissionRepository"),
TicketRepository: Symbol.for("TicketRepository"),
TicketMessageRepository: Symbol.for("TicketMessageRepository"),
TicketCategoryRepository: Symbol.for("TicketCategoryRepository"),
ChatRepository: Symbol.for("ChatRepository"),
ChatMessageRepository: Symbol.for("ChatMessageRepository"),
WalletRepo: Symbol.for("WalletRepo"),
TransactionRepo: Symbol.for("TransactionRepo"),
WithdrawalRepo: Symbol.for("WithdrawalRepo"),
WishlistRepo: Symbol.for("WishlistRepo"),
JobRepo: Symbol.for("JobRepo"),
ResumeRepo: Symbol.for("ResumeRepo"),
FaqRepo: Symbol.for("FaqRepo"),
SiteSettingRepo: Symbol.for("SiteSettingRepo"),
NotificationRepo: Symbol.for("NotificationRepo"),
ReturnOrderRepo: Symbol.for("ReturnOrderRepo"),
CancelOrderRepo: Symbol.for("CancelOrderRepo"),
ContractRepository: Symbol.for("ContractRepo"),
ReturnOrderItemRepo: Symbol.for("ReturnOrderItemRepo"),
CancelOrderItemRepo: Symbol.for("CancelOrderItemRepo"),
ReturnReasonRepo: Symbol.for("ReturnReasonRepo"),
CancelReasonRepo: Symbol.for("CancelReasonRepo"),
FineRuleRepo: Symbol.for("FineRuleRepo"),
FineRepo: Symbol.for("FineRepo"),
ShopRepo: Symbol.for("ShopRepo"),
WholesaleRequestRepo: Symbol.for("WholesaleRequestRepo"),
AddressRepo: Symbol.for("AddressRepo"),
CityRepo: Symbol.for("CityRepo"),
ProvinceRepo: Symbol.for("ProvinceRepo"),
ContactUsRepo: Symbol.for("ContactUsRepo"),
AboutUsRepo: Symbol.for("AboutUsRepo"),
NewsletterRepo: Symbol.for("NewsletterRepo"),
// #endregion
Logger: Symbol.for("Logger"),
ZarinPalGateway: Symbol.for("ZarinPalGateway"),
AsanPardakhtGateway: Symbol.for("AsanPardakhtGateway"),
PaymentGateway: Symbol.for("PaymentGateway"),
};