File tree 8 files changed +22
-2
lines changed
8 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 55
55
<artifactId >junit</artifactId >
56
56
<scope >test</scope >
57
57
</dependency >
58
+ <dependency >
59
+ <groupId >org.springframework.boot</groupId >
60
+ <artifactId >spring-boot-starter-data-jpa</artifactId >
61
+ </dependency >
62
+ <dependency >
63
+ <groupId >com.h2database</groupId >
64
+ <artifactId >h2</artifactId >
65
+ </dependency >
66
+ <dependency >
67
+ <groupId >org.springframework.boot</groupId >
68
+ <artifactId >spring-boot-starter-test</artifactId >
69
+ </dependency >
58
70
</dependencies >
59
71
60
72
Original file line number Diff line number Diff line change 2
2
3
3
import com .serve .api .dto .AdminDto ;
4
4
import com .serve .api .model .entity .Admin ;
5
+ import org .springframework .stereotype .Service ;
5
6
7
+ @ Service
6
8
public class AdminDtoMapper {
7
9
8
10
public AdminDto toDto (Admin admin ) {
Original file line number Diff line number Diff line change 2
2
3
3
import com .serve .api .dto .AdminPswDto ;
4
4
import com .serve .api .model .entity .Admin ;
5
+ import org .springframework .stereotype .Service ;
5
6
7
+ @ Service
6
8
public class AdminPswMapper {
7
9
8
10
public AdminPswDto toDto (Admin admin ) {
Original file line number Diff line number Diff line change 2
2
3
3
import com .serve .api .dto .TerminalDto ;
4
4
import com .serve .api .model .entity .Terminal ;
5
+ import org .springframework .stereotype .Service ;
5
6
6
7
import java .util .Objects ;
7
8
9
+ @ Service
8
10
public class TerminalMapper {
9
11
10
12
public TerminalDto toDto (Terminal terminal ) {
Original file line number Diff line number Diff line change @@ -20,6 +20,6 @@ public class Terminal extends BaseEntity {
20
20
String description ;
21
21
22
22
@ ManyToOne
23
- @ JoinColumn (name = "company_id" , nullable = false )
23
+ @ JoinColumn (name = "company_id" , nullable = true )
24
24
Company company ;
25
25
}
Original file line number Diff line number Diff line change @@ -25,6 +25,6 @@ public class Worker extends BaseEntity {
25
25
boolean isActive ;
26
26
27
27
@ ManyToOne
28
- @ JoinColumn (name = "company_id" , nullable = false )
28
+ @ JoinColumn (name = "company_id" , nullable = true )
29
29
Company company ;
30
30
}
Original file line number Diff line number Diff line change 4
4
import com .serve .api .mapper .TerminalMapper ;
5
5
import com .serve .api .model .entity .Terminal ;
6
6
import com .serve .api .repository .TerminalRepository ;
7
+ import lombok .AllArgsConstructor ;
7
8
import org .springframework .stereotype .Service ;
8
9
9
10
import java .util .List ;
10
11
import java .util .Objects ;
11
12
import java .util .stream .Collectors ;
12
13
13
14
@ Service
15
+ @ AllArgsConstructor
14
16
public class TerminalService {
15
17
16
18
TerminalRepository repository ;
You can’t perform that action at this time.
0 commit comments