Skip to content

Commit 824abf1

Browse files
author
mustafa.tanis
committed
personel için advans domain dto servis ve restleri oluşturuldu
1 parent e5f9485 commit 824abf1

File tree

5 files changed

+118
-0
lines changed

5 files changed

+118
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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 SalaryDto {
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+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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 AdvanceLoanResource {
20+
private final AdvanceLoan advanceLoan;
21+
22+
23+
24+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
}

0 commit comments

Comments
 (0)