You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

30 lines
1.2 KiB

import { Module } from "@nestjs/common";
import { ProductsService } from "./products.service";
import { ProductsController } from "./products.controller";
import { SequelizeModule } from "@nestjs/sequelize";
import { Product } from "./entities/product.entity";
import { RoleGuard } from "src/guard/role.guard";
import { JwtModule } from "@nestjs/jwt";
import { Cart } from "./entities/cart.entity";
import { JwtAuthGuard } from "src/guard/auth.guard";
import { Invoice } from "src/invoice/entities/invoice.entity";
import { InvoiceModule } from "src/invoice/invoice.module";
import { WalletModule } from "src/wallet/wallet.module";
import { Wallet } from "./entities/wallet.entity";
import { Transaction } from "./entities/transaction.entity";
import { PaymentService } from "src/payment/payment.service";
import { Payment } from "./entities/payment.entity";
@Module({
imports: [SequelizeModule.forFeature([Product,Cart,Invoice,Wallet, Transaction,Payment]),
JwtModule.register({
secret: process.env.JWT_SECRET,
signOptions: { expiresIn: '1h' },
}),
WalletModule,
InvoiceModule
],
controllers: [ProductsController],
providers: [ProductsService,RoleGuard,JwtAuthGuard,PaymentService],
})
export class ProductsModule {}