This commit enhances the stocks module by adding new import modules, implementing more stock related endpoints and methods, and creating a new dto for stock data validation. The stocks service now includes methods to get a product's stock, create, alter, get the current stock, rank products by stock, get all stocks, decrement and increment product stock. StocksController now holds endpoints to add a new stock, get products with more or less stock, edit a stock, and get a stock of a specific product.
13 lines
421 B
TypeScript
13 lines
421 B
TypeScript
import { Module } from '@nestjs/common';
|
|
import { StocksController } from './stocks.controller';
|
|
import { StocksService } from './stocks.service';
|
|
import { DrizzleModule } from "src/drizzle/drizzle.module";
|
|
import { ProductsModule } from "src/products/products.module";
|
|
|
|
@Module({
|
|
imports: [DrizzleModule, ProductsModule],
|
|
controllers: [StocksController],
|
|
providers: [StocksService]
|
|
})
|
|
export class StocksModule {}
|