Init Nest-Neo4j
This commit is contained in:
34
Nest/src/std_zh/diagnoza/diagnoza.controller.ts
Normal file
34
Nest/src/std_zh/diagnoza/diagnoza.controller.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
|
||||
import { DiagnozaService } from './diagnoza.service';
|
||||
import { CreateDiagnozaDto } from './dto/create-diagnoza.dto';
|
||||
import { UpdateDiagnozaDto } from './dto/update-diagnoza.dto';
|
||||
|
||||
@Controller('diagnoza')
|
||||
export class DiagnozaController {
|
||||
constructor(private readonly diagnozaService: DiagnozaService) {}
|
||||
|
||||
@Post()
|
||||
create(@Body() createDiagnozaDto: CreateDiagnozaDto) {
|
||||
return this.diagnozaService.create(createDiagnozaDto);
|
||||
}
|
||||
|
||||
@Get()
|
||||
findAll() {
|
||||
return this.diagnozaService.findAll();
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('id') id: string) {
|
||||
return this.diagnozaService.findOne(+id);
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
update(@Param('id') id: string, @Body() updateDiagnozaDto: UpdateDiagnozaDto) {
|
||||
return this.diagnozaService.update(+id, updateDiagnozaDto);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
remove(@Param('id') id: string) {
|
||||
return this.diagnozaService.remove(+id);
|
||||
}
|
||||
}
|
||||
9
Nest/src/std_zh/diagnoza/diagnoza.module.ts
Normal file
9
Nest/src/std_zh/diagnoza/diagnoza.module.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { DiagnozaService } from './diagnoza.service';
|
||||
import { DiagnozaController } from './diagnoza.controller';
|
||||
|
||||
@Module({
|
||||
controllers: [DiagnozaController],
|
||||
providers: [DiagnozaService]
|
||||
})
|
||||
export class DiagnozaModule {}
|
||||
26
Nest/src/std_zh/diagnoza/diagnoza.service.ts
Normal file
26
Nest/src/std_zh/diagnoza/diagnoza.service.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { CreateDiagnozaDto } from './dto/create-diagnoza.dto';
|
||||
import { UpdateDiagnozaDto } from './dto/update-diagnoza.dto';
|
||||
|
||||
@Injectable()
|
||||
export class DiagnozaService {
|
||||
create(createDiagnozaDto: CreateDiagnozaDto) {
|
||||
return 'This action adds a new diagnoza';
|
||||
}
|
||||
|
||||
findAll() {
|
||||
return `This action returns all diagnoza`;
|
||||
}
|
||||
|
||||
findOne(id: number) {
|
||||
return `This action returns a #${id} diagnoza`;
|
||||
}
|
||||
|
||||
update(id: number, updateDiagnozaDto: UpdateDiagnozaDto) {
|
||||
return `This action updates a #${id} diagnoza`;
|
||||
}
|
||||
|
||||
remove(id: number) {
|
||||
return `This action removes a #${id} diagnoza`;
|
||||
}
|
||||
}
|
||||
1
Nest/src/std_zh/diagnoza/dto/create-diagnoza.dto.ts
Normal file
1
Nest/src/std_zh/diagnoza/dto/create-diagnoza.dto.ts
Normal file
@@ -0,0 +1 @@
|
||||
export class CreateDiagnozaDto {}
|
||||
4
Nest/src/std_zh/diagnoza/dto/update-diagnoza.dto.ts
Normal file
4
Nest/src/std_zh/diagnoza/dto/update-diagnoza.dto.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import { PartialType } from '@nestjs/mapped-types';
|
||||
import { CreateDiagnozaDto } from './create-diagnoza.dto';
|
||||
|
||||
export class UpdateDiagnozaDto extends PartialType(CreateDiagnozaDto) {}
|
||||
1
Nest/src/std_zh/diagnoza/entities/diagnoza.entity.ts
Normal file
1
Nest/src/std_zh/diagnoza/entities/diagnoza.entity.ts
Normal file
@@ -0,0 +1 @@
|
||||
export class Diagnoza {}
|
||||
Reference in New Issue
Block a user