Skip to content

Commit e78eb66

Browse files
committed
feat: add role controller and add isManagement to migration #34
1 parent 661e77f commit e78eb66

2 files changed

Lines changed: 24 additions & 3 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package ch.puzzle.pcts.controller;
2+
3+
import ch.puzzle.pcts.mapper.RoleMapper;
4+
import ch.puzzle.pcts.service.business.RoleBusinessService;
5+
import org.springframework.beans.factory.annotation.Autowired;
6+
import org.springframework.web.bind.annotation.RequestMapping;
7+
import org.springframework.web.bind.annotation.RestController;
8+
9+
@RestController
10+
@RequestMapping("/api/v1/role")
11+
public class RoleController {
12+
private final RoleMapper mapper;
13+
private final RoleBusinessService service;
14+
15+
@Autowired
16+
public RoleController(RoleMapper mapper, RoleBusinessService service) {
17+
this.mapper = mapper;
18+
this.service = service;
19+
}
20+
}
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
CREATE SEQUENCE IF NOT EXISTS sequence_role;
22
CREATE TABLE IF NOT EXISTS role
33
(
4-
id BIGINT NOT NUll PRIMARY KEY,
5-
name VARCHAR(250) NOT NULL,
6-
deleted_at TIMESTAMP NOT NULL
4+
id BIGINT NOT NUll PRIMARY KEY,
5+
name VARCHAR(250) NOT NULL,
6+
deleted_at TIMESTAMP NOT NULL,
7+
is_management BOOLEAN NOT NULL
78
);

0 commit comments

Comments
 (0)