diff --git a/src/main/java/aromanticcat/umcproject/controller/AddressBookController.java b/src/main/java/aromanticcat/umcproject/controller/AddressBookController.java new file mode 100644 index 0000000..ec2bfc7 --- /dev/null +++ b/src/main/java/aromanticcat/umcproject/controller/AddressBookController.java @@ -0,0 +1,24 @@ +package aromanticcat.umcproject.controller; + + +import aromanticcat.umcproject.apiPayload.ApiResponse; +import aromanticcat.umcproject.service.AdressBookService.AddressBookQueryService; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/address-book") +@RequiredArgsConstructor +public class AddressBookController { + + private final AddressBookQueryService addressBookQueryService; + +// @GetMapping("/") +// @ApiOperation("주소록 조회") +// public ApiResponse<> + + +} diff --git a/src/main/java/aromanticcat/umcproject/dto/AddressBook/AddressBookRequestDTO.java b/src/main/java/aromanticcat/umcproject/dto/AddressBook/AddressBookRequestDTO.java new file mode 100644 index 0000000..714f3a0 --- /dev/null +++ b/src/main/java/aromanticcat/umcproject/dto/AddressBook/AddressBookRequestDTO.java @@ -0,0 +1,5 @@ +package aromanticcat.umcproject.dto.AddressBook; + + +public class AddressBookRequestDTO { +} diff --git a/src/main/java/aromanticcat/umcproject/dto/AddressBook/AddressBookRespondDTO.java b/src/main/java/aromanticcat/umcproject/dto/AddressBook/AddressBookRespondDTO.java new file mode 100644 index 0000000..11240c7 --- /dev/null +++ b/src/main/java/aromanticcat/umcproject/dto/AddressBook/AddressBookRespondDTO.java @@ -0,0 +1,26 @@ +package aromanticcat.umcproject.dto.AddressBook; + +import lombok.Getter; + +public class AddressBookRespondDTO { + + @Getter + public static class friendListDTO{ + +// List friends; + + } + + @Getter + public static class friendDTO{ + + Long friend_id; + + String friend_name; + + boolean are_we_friend; + + boolean are_we_close; + + } +} diff --git a/src/main/java/aromanticcat/umcproject/entity/Friend.java b/src/main/java/aromanticcat/umcproject/entity/Friend.java index 82831e7..1a5043d 100644 --- a/src/main/java/aromanticcat/umcproject/entity/Friend.java +++ b/src/main/java/aromanticcat/umcproject/entity/Friend.java @@ -1,29 +1,34 @@ package aromanticcat.umcproject.entity; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import lombok.Getter; +import javax.persistence.*; + +import lombok.*; @Entity @Getter +@Builder +@NoArgsConstructor(access = AccessLevel.PROTECTED) +@AllArgsConstructor public class Friend extends BaseEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "friend_id") private Long id; + private String friend_name; + @JoinColumn(name = "to_user_id") @ManyToOne(fetch = FetchType.LAZY) private Member member; + private Long to_user_id; + private Long from_user_id; - private boolean are_we_friend; + private boolean are_we_friend; // 친구인지 여부 + + private boolean are_we_close; // 친한 친구인지 여부 - private int times; + private int exchange_num; } diff --git a/src/main/java/aromanticcat/umcproject/service/AdressBookService/AddressBookCommandService.java b/src/main/java/aromanticcat/umcproject/service/AdressBookService/AddressBookCommandService.java new file mode 100644 index 0000000..7c0f793 --- /dev/null +++ b/src/main/java/aromanticcat/umcproject/service/AdressBookService/AddressBookCommandService.java @@ -0,0 +1,4 @@ +package aromanticcat.umcproject.service.AdressBookService; + +public interface AddressBookCommandService { +} diff --git a/src/main/java/aromanticcat/umcproject/service/AdressBookService/AddressBookCommandServiceImpl.java b/src/main/java/aromanticcat/umcproject/service/AdressBookService/AddressBookCommandServiceImpl.java new file mode 100644 index 0000000..a768a8a --- /dev/null +++ b/src/main/java/aromanticcat/umcproject/service/AdressBookService/AddressBookCommandServiceImpl.java @@ -0,0 +1,7 @@ +package aromanticcat.umcproject.service.AdressBookService; + +import org.springframework.stereotype.Service; + +@Service +public class AddressBookCommandServiceImpl implements AddressBookCommandService{ +} diff --git a/src/main/java/aromanticcat/umcproject/service/AdressBookService/AddressBookQueryService.java b/src/main/java/aromanticcat/umcproject/service/AdressBookService/AddressBookQueryService.java new file mode 100644 index 0000000..a2a05ae --- /dev/null +++ b/src/main/java/aromanticcat/umcproject/service/AdressBookService/AddressBookQueryService.java @@ -0,0 +1,4 @@ +package aromanticcat.umcproject.service.AdressBookService; + +public interface AddressBookQueryService { +} diff --git a/src/main/java/aromanticcat/umcproject/service/AdressBookService/AddressBookQueryServiceImpl.java b/src/main/java/aromanticcat/umcproject/service/AdressBookService/AddressBookQueryServiceImpl.java new file mode 100644 index 0000000..dadc783 --- /dev/null +++ b/src/main/java/aromanticcat/umcproject/service/AdressBookService/AddressBookQueryServiceImpl.java @@ -0,0 +1,7 @@ +package aromanticcat.umcproject.service.AdressBookService; + +import org.springframework.stereotype.Service; + +@Service +public class AddressBookQueryServiceImpl implements AddressBookQueryService{ +}