new modules
This commit is contained in:
@@ -26,6 +26,8 @@ import { InventoryModule } from './modules/inventory/inventory.module';
|
|||||||
import { IconsModule } from './modules/icons/icons.module';
|
import { IconsModule } from './modules/icons/icons.module';
|
||||||
import { CacheModule } from '@nestjs/cache-manager';
|
import { CacheModule } from '@nestjs/cache-manager';
|
||||||
import { cacheConfig } from './config/cache.config';
|
import { cacheConfig } from './config/cache.config';
|
||||||
|
import { BusinessModule } from './modules/business/business.module';
|
||||||
|
import { CatalogueModule } from './modules/catalogue/catalogue.module';
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -59,6 +61,8 @@ import { cacheConfig } from './config/cache.config';
|
|||||||
ContactModule,
|
ContactModule,
|
||||||
InventoryModule,
|
InventoryModule,
|
||||||
IconsModule,
|
IconsModule,
|
||||||
|
BusinessModule,
|
||||||
|
CatalogueModule,
|
||||||
],
|
],
|
||||||
controllers: [],
|
controllers: [],
|
||||||
providers: [],
|
providers: [],
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
|
||||||
|
import { BusinessService } from './business.service';
|
||||||
|
import { CreateBusinessDto } from './dto/create-business.dto';
|
||||||
|
import { UpdateBusinessDto } from './dto/update-business.dto';
|
||||||
|
|
||||||
|
@Controller('business')
|
||||||
|
export class BusinessController {
|
||||||
|
constructor(private readonly businessService: BusinessService) {}
|
||||||
|
|
||||||
|
@Post()
|
||||||
|
create(@Body() createBusinessDto: CreateBusinessDto) {
|
||||||
|
return this.businessService.create(createBusinessDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get()
|
||||||
|
findAll() {
|
||||||
|
return this.businessService.findAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get(':id')
|
||||||
|
findOne(@Param('id') id: string) {
|
||||||
|
return this.businessService.findOne(+id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Patch(':id')
|
||||||
|
update(@Param('id') id: string, @Body() updateBusinessDto: UpdateBusinessDto) {
|
||||||
|
return this.businessService.update(+id, updateBusinessDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Delete(':id')
|
||||||
|
remove(@Param('id') id: string) {
|
||||||
|
return this.businessService.remove(+id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
import { Module } from '@nestjs/common';
|
||||||
|
import { BusinessService } from './business.service';
|
||||||
|
import { BusinessController } from './business.controller';
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
controllers: [BusinessController],
|
||||||
|
providers: [BusinessService],
|
||||||
|
})
|
||||||
|
export class BusinessModule {}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
import { Injectable } from '@nestjs/common';
|
||||||
|
import { CreateBusinessDto } from './dto/create-business.dto';
|
||||||
|
import { UpdateBusinessDto } from './dto/update-business.dto';
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class BusinessService {
|
||||||
|
create(createBusinessDto: CreateBusinessDto) {
|
||||||
|
return 'This action adds a new business';
|
||||||
|
}
|
||||||
|
|
||||||
|
findAll() {
|
||||||
|
return `This action returns all business`;
|
||||||
|
}
|
||||||
|
|
||||||
|
findOne(id: number) {
|
||||||
|
return `This action returns a #${id} business`;
|
||||||
|
}
|
||||||
|
|
||||||
|
update(id: number, updateBusinessDto: UpdateBusinessDto) {
|
||||||
|
return `This action updates a #${id} business`;
|
||||||
|
}
|
||||||
|
|
||||||
|
remove(id: number) {
|
||||||
|
return `This action removes a #${id} business`;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export class CreateBusinessDto {}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
import { PartialType } from '@nestjs/swagger';
|
||||||
|
import { CreateBusinessDto } from './create-business.dto';
|
||||||
|
|
||||||
|
export class UpdateBusinessDto extends PartialType(CreateBusinessDto) {}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export class Business {}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
|
||||||
|
import { CatalogueService } from './catalogue.service';
|
||||||
|
import { CreateCatalogueDto } from './dto/create-catalogue.dto';
|
||||||
|
import { UpdateCatalogueDto } from './dto/update-catalogue.dto';
|
||||||
|
|
||||||
|
@Controller('catalogue')
|
||||||
|
export class CatalogueController {
|
||||||
|
constructor(private readonly catalogueService: CatalogueService) {}
|
||||||
|
|
||||||
|
@Post()
|
||||||
|
create(@Body() createCatalogueDto: CreateCatalogueDto) {
|
||||||
|
return this.catalogueService.create(createCatalogueDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get()
|
||||||
|
findAll() {
|
||||||
|
return this.catalogueService.findAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get(':id')
|
||||||
|
findOne(@Param('id') id: string) {
|
||||||
|
return this.catalogueService.findOne(+id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Patch(':id')
|
||||||
|
update(@Param('id') id: string, @Body() updateCatalogueDto: UpdateCatalogueDto) {
|
||||||
|
return this.catalogueService.update(+id, updateCatalogueDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Delete(':id')
|
||||||
|
remove(@Param('id') id: string) {
|
||||||
|
return this.catalogueService.remove(+id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
import { Module } from '@nestjs/common';
|
||||||
|
import { CatalogueService } from './catalogue.service';
|
||||||
|
import { CatalogueController } from './catalogue.controller';
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
controllers: [CatalogueController],
|
||||||
|
providers: [CatalogueService],
|
||||||
|
})
|
||||||
|
export class CatalogueModule {}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
import { Injectable } from '@nestjs/common';
|
||||||
|
import { CreateCatalogueDto } from './dto/create-catalogue.dto';
|
||||||
|
import { UpdateCatalogueDto } from './dto/update-catalogue.dto';
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class CatalogueService {
|
||||||
|
create(createCatalogueDto: CreateCatalogueDto) {
|
||||||
|
return 'This action adds a new catalogue';
|
||||||
|
}
|
||||||
|
|
||||||
|
findAll() {
|
||||||
|
return `This action returns all catalogue`;
|
||||||
|
}
|
||||||
|
|
||||||
|
findOne(id: number) {
|
||||||
|
return `This action returns a #${id} catalogue`;
|
||||||
|
}
|
||||||
|
|
||||||
|
update(id: number, updateCatalogueDto: UpdateCatalogueDto) {
|
||||||
|
return `This action updates a #${id} catalogue`;
|
||||||
|
}
|
||||||
|
|
||||||
|
remove(id: number) {
|
||||||
|
return `This action removes a #${id} catalogue`;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export class CreateCatalogueDto {}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
import { PartialType } from '@nestjs/swagger';
|
||||||
|
import { CreateCatalogueDto } from './create-catalogue.dto';
|
||||||
|
|
||||||
|
export class UpdateCatalogueDto extends PartialType(CreateCatalogueDto) {}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export class Catalogue {}
|
||||||
Reference in New Issue
Block a user