feat: first commit

This commit is contained in:
2024-10-26 12:10:13 +08:00
parent b244826aa1
commit b064c4cb87
158 changed files with 18888 additions and 1 deletions

View File

@@ -0,0 +1,44 @@
import {
Controller,
Get,
Post,
Body,
Patch,
Param,
Delete,
Query,
} from '@nestjs/common';
import { RoleService } from './role.service';
import { CreateRoleDto } from './dto/create-role.dto';
import { UpdateRoleDto } from './dto/update-role.dto';
import { QueryListDto } from './dto/query-list.dto';
@Controller()
export class RoleController {
constructor(private readonly roleService: RoleService) {}
@Post()
create(@Body() dto: CreateRoleDto) {
return this.roleService.create(dto);
}
@Get()
findPage(@Query() dto: QueryListDto): Promise<QueryListResult> {
return this.roleService.findPage(dto);
}
@Get('/all')
findAll() {
return this.roleService.findAll();
}
@Patch(':id')
update(@Param('id') id: string, @Body() dto: UpdateRoleDto) {
return this.roleService.update(+id, dto);
}
@Delete(':id')
remove(@Param('id') id: string) {
return this.roleService.remove(+id);
}
}