Init Nest-Neo4j

This commit is contained in:
2022-09-22 10:08:42 +02:00
parent 3e147ae929
commit 2421651a92
51 changed files with 9766 additions and 0 deletions

View File

@@ -0,0 +1 @@
export class CreatePacientiDto {}

View File

@@ -0,0 +1,4 @@
import { PartialType } from '@nestjs/mapped-types';
import { CreatePacientiDto } from './create-pacienti.dto';
export class UpdatePacientiDto extends PartialType(CreatePacientiDto) {}

View File

@@ -0,0 +1 @@
export class Pacienti {}

View File

@@ -0,0 +1,34 @@
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { PacientiService } from './pacienti.service';
import { CreatePacientiDto } from './dto/create-pacienti.dto';
import { UpdatePacientiDto } from './dto/update-pacienti.dto';
@Controller('pacienti')
export class PacientiController {
constructor(private readonly pacientiService: PacientiService) {}
@Post()
create(@Body() createPacientiDto: CreatePacientiDto) {
return this.pacientiService.create(createPacientiDto);
}
@Get()
findAll() {
return this.pacientiService.findAll();
}
@Get(':id')
findOne(@Param('id') id: string) {
return this.pacientiService.findOne(+id);
}
@Patch(':id')
update(@Param('id') id: string, @Body() updatePacientiDto: UpdatePacientiDto) {
return this.pacientiService.update(+id, updatePacientiDto);
}
@Delete(':id')
remove(@Param('id') id: string) {
return this.pacientiService.remove(+id);
}
}

View File

@@ -0,0 +1,9 @@
import { Module } from '@nestjs/common';
import { PacientiService } from './pacienti.service';
import { PacientiController } from './pacienti.controller';
@Module({
controllers: [PacientiController],
providers: [PacientiService]
})
export class PacientiModule {}

View File

@@ -0,0 +1,26 @@
import { Injectable } from '@nestjs/common';
import { CreatePacientiDto } from './dto/create-pacienti.dto';
import { UpdatePacientiDto } from './dto/update-pacienti.dto';
@Injectable()
export class PacientiService {
create(createPacientiDto: CreatePacientiDto) {
return 'This action adds a new pacienti';
}
findAll() {
return `This action returns all pacienti`;
}
findOne(id: number) {
return `This action returns a #${id} pacienti`;
}
update(id: number, updatePacientiDto: UpdatePacientiDto) {
return `This action updates a #${id} pacienti`;
}
remove(id: number) {
return `This action removes a #${id} pacienti`;
}
}