File tree Expand file tree Collapse file tree 10 files changed +230
-0
lines changed
salary-service/src/main/java/com/cevher/ms/salary Expand file tree Collapse file tree 10 files changed +230
-0
lines changed Original file line number Diff line number Diff line change 1+ package com .cevher .ms .salary .domain ;
2+
3+ import lombok .*;
4+
5+ import javax .persistence .*;
6+ import java .io .Serializable ;
7+ import java .time .LocalDate ;
8+
9+ @ Getter
10+ @ Setter
11+ @ NoArgsConstructor
12+ @ AllArgsConstructor
13+ @ Builder
14+ @ ToString
15+ @ EqualsAndHashCode
16+ @ Entity
17+ @ Table (name = "advance_loan" )
18+ public class AdvanceLoan implements Serializable {
19+
20+ @ Id
21+ @ GeneratedValue (strategy = GenerationType .IDENTITY )
22+ private Long id ;
23+ private LocalDate date ;
24+ private Long personId ;
25+ private Double amount ;
26+ private LocalDate createdAt ;
27+ private String createdBy ;
28+ }
Original file line number Diff line number Diff line change 1+ package com .cevher .ms .salary .domain ;
2+
3+ import lombok .*;
4+
5+ import javax .persistence .*;
6+ import java .io .Serializable ;
7+ import java .time .LocalDate ;
8+
9+ @ Getter
10+ @ Setter
11+ @ NoArgsConstructor
12+ @ AllArgsConstructor
13+ @ Builder
14+ @ ToString
15+ @ EqualsAndHashCode
16+ @ Entity
17+ @ Table (name = "person_salary" )
18+ public class PersonSalary implements Serializable {
19+
20+ @ Id
21+ @ GeneratedValue (strategy = GenerationType .IDENTITY )
22+ private Long id ;
23+ private Long personId ;
24+ private Double amount ;
25+ private LocalDate createdAt ;
26+ private String createdBy ;
27+ }
Original file line number Diff line number Diff line change 1+ package com .cevher .ms .salary .dto ;
2+
3+ import lombok .*;
4+
5+ import javax .persistence .Entity ;
6+ import javax .persistence .Id ;
7+ import javax .persistence .Table ;
8+ import java .io .Serializable ;
9+ import java .time .LocalDate ;
10+ import java .time .chrono .ChronoLocalDate ;
11+ import java .time .format .DateTimeFormatter ;
12+
13+ @ Getter
14+ @ Setter
15+ @ NoArgsConstructor
16+ @ AllArgsConstructor
17+ @ Builder
18+ @ ToString
19+ @ EqualsAndHashCode
20+ public class AdvanceLoanDto {
21+ private Long id ;
22+ private LocalDate date ;
23+ private Long personId ;
24+ private Double amount ;
25+ private LocalDate createdAt ;
26+ private String createdBy ;
27+
28+
29+ }
Original file line number Diff line number Diff line change 1+ package com .cevher .ms .salary .dto ;
2+
3+ import lombok .*;
4+
5+ import javax .persistence .Entity ;
6+ import javax .persistence .Id ;
7+ import javax .persistence .Table ;
8+ import java .io .Serializable ;
9+ import java .time .LocalDate ;
10+ import java .time .chrono .ChronoLocalDate ;
11+ import java .time .format .DateTimeFormatter ;
12+
13+ @ Getter
14+ @ Setter
15+ @ NoArgsConstructor
16+ @ AllArgsConstructor
17+ @ Builder
18+ @ ToString
19+ @ EqualsAndHashCode
20+ public class PersonSalaryDto {
21+ private Long id ;
22+ private Long personId ;
23+ private Double amount ;
24+
25+ }
Original file line number Diff line number Diff line change 1+ package com .cevher .ms .salary .repository ;
2+
3+ import com .cevher .ms .salary .domain . AdvanceLoan ;
4+ import org .springframework .data .domain .Page ;
5+ import org .springframework .data .domain .Pageable ;
6+ import org .springframework .data .jpa .repository .JpaRepository ;
7+
8+ import java .time .LocalDate ;
9+ import java .util .Optional ;
10+
11+
12+ public interface AdvanceLoanRepository
13+ extends JpaRepository <AdvanceLoan , Long > {
14+
15+ }
Original file line number Diff line number Diff line change 1+ package com .cevher .ms .salary .repository ;
2+
3+ import com .cevher .ms .salary .domain .PersonSalary ;
4+ import com .cevher .ms .salary .domain .Salary ;
5+ import com .cevher .ms .salary .dto .SalaryDto ;
6+ import org .springframework .data .domain .Page ;
7+ import org .springframework .data .domain .Pageable ;
8+ import org .springframework .data .jpa .repository .JpaRepository ;
9+
10+ import java .time .LocalDate ;
11+ import java .util .Optional ;
12+
13+
14+ public interface PersonSalaryRepository
15+ extends JpaRepository <PersonSalary , Long > {
16+ }
Original file line number Diff line number Diff line change 1+ package com .cevher .ms .salary .rest ;
2+
3+ import com .cevher .ms .salary .domain .AdvanceLoan ;
4+ import com .cevher .ms .salary .dto .SalaryDto ;
5+ import com .cevher .ms .salary .service .SalaryService ;
6+ import lombok .RequiredArgsConstructor ;
7+ import lombok .extern .slf4j .Slf4j ;
8+ import org .apache .tomcat .jni .Local ;
9+ import org .springframework .data .domain .Pageable ;
10+ import org .springframework .http .ResponseEntity ;
11+ import org .springframework .web .bind .annotation .*;
12+
13+ import java .time .LocalDate ;
14+ import java .util .List ;
15+
16+ @ RestController
17+ @ Slf4j
18+ @ RequiredArgsConstructor
19+ @ RequestMapping ("/" )
20+ public class AdvanceLoanResource {
21+ private final AdvanceLoan advanceLoan ;
22+
23+
24+
25+ }
Original file line number Diff line number Diff line change 1+ package com .cevher .ms .salary .rest ;
2+
3+ import com .cevher .ms .salary .dto .SalaryDto ;
4+ import com .cevher .ms .salary .service .SalaryService ;
5+ import lombok .RequiredArgsConstructor ;
6+ import lombok .extern .slf4j .Slf4j ;
7+ import org .apache .tomcat .jni .Local ;
8+ import org .springframework .data .domain .Pageable ;
9+ import org .springframework .http .ResponseEntity ;
10+ import org .springframework .web .bind .annotation .*;
11+
12+ import java .time .LocalDate ;
13+ import java .util .List ;
14+
15+ @ RestController
16+ @ Slf4j
17+ @ RequiredArgsConstructor
18+ @ RequestMapping ("/" )
19+ public class PersonSalaryResource {
20+
21+ }
Original file line number Diff line number Diff line change 1+ package com .cevher .ms .salary .service ;
2+
3+ import com .cevher .ms .salary .domain .Salary ;
4+ import com .cevher .ms .salary .dto .SalaryDto ;
5+ import com .cevher .ms .salary .exception .AlreadySalaryException ;
6+ import com .cevher .ms .salary .repository .SalaryRepository ;
7+ import lombok .RequiredArgsConstructor ;
8+ import lombok .extern .slf4j .Slf4j ;
9+ import org .springframework .data .domain .Page ;
10+ import org .springframework .data .domain .Pageable ;
11+ import org .springframework .stereotype .Service ;
12+
13+ import java .time .LocalDate ;
14+ import java .util .List ;
15+
16+
17+ @ Service
18+ @ RequiredArgsConstructor
19+ @ Slf4j
20+ public class AdvanceLoanService {
21+
22+ }
Original file line number Diff line number Diff line change 1+ package com .cevher .ms .salary .service ;
2+
3+ import com .cevher .ms .salary .domain .Salary ;
4+ import com .cevher .ms .salary .dto .SalaryDto ;
5+ import com .cevher .ms .salary .exception .AlreadySalaryException ;
6+ import com .cevher .ms .salary .repository .SalaryRepository ;
7+ import lombok .RequiredArgsConstructor ;
8+ import lombok .extern .slf4j .Slf4j ;
9+ import org .springframework .data .domain .Page ;
10+ import org .springframework .data .domain .Pageable ;
11+ import org .springframework .stereotype .Service ;
12+
13+ import java .time .LocalDate ;
14+ import java .util .List ;
15+
16+
17+ @ Service
18+ @ RequiredArgsConstructor
19+ @ Slf4j
20+ public class PersonSalaryService {
21+
22+ }
You can’t perform that action at this time.
0 commit comments