From 21d3c6eabe490b066a0721168238730af97a059c Mon Sep 17 00:00:00 2001 From: hyunseo Date: Thu, 26 Sep 2024 17:20:39 +0900 Subject: [PATCH 01/10] =?UTF-8?q?[chore]=20=EC=B6=A9=EB=8F=8C=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=9E=84=EC=8B=9C=EB=A1=9C=20=EC=82=AD=EC=A0=9C=20?= =?UTF-8?q?=EB=B0=8F=20=EC=A3=BC=EC=84=9D=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inplace/video/entity/Influencer.java | 26 ----------- .../team7/inplace/video/entity/Place.java | 22 ---------- .../team7/inplace/video/entity/Video.java | 13 +++++- .../repository/InfluencerRepository.java | 15 ------- .../video/repository/VideoRepository.java | 4 +- .../inplace/video/service/VideoService.java | 44 +++++++++---------- 6 files changed, 34 insertions(+), 90 deletions(-) delete mode 100644 src/main/java/team7/inplace/video/entity/Influencer.java delete mode 100644 src/main/java/team7/inplace/video/entity/Place.java delete mode 100644 src/main/java/team7/inplace/video/repository/InfluencerRepository.java diff --git a/src/main/java/team7/inplace/video/entity/Influencer.java b/src/main/java/team7/inplace/video/entity/Influencer.java deleted file mode 100644 index 0cc69f8d..00000000 --- a/src/main/java/team7/inplace/video/entity/Influencer.java +++ /dev/null @@ -1,26 +0,0 @@ -package team7.inplace.video.entity; - -import jakarta.persistence.Column; -import jakarta.persistence.Entity; -import jakarta.persistence.Id; -import lombok.Getter; - -@Entity -@Getter -public class Influencer { - /* - * 더미 데이터 입니다 !!! - */ - @Id - private Long id; - @Column - private String name; - @Column - private String job; - @Column - private String imgUrl; - - protected Influencer() { - - } -} diff --git a/src/main/java/team7/inplace/video/entity/Place.java b/src/main/java/team7/inplace/video/entity/Place.java deleted file mode 100644 index cce24170..00000000 --- a/src/main/java/team7/inplace/video/entity/Place.java +++ /dev/null @@ -1,22 +0,0 @@ -package team7.inplace.video.entity; - -import jakarta.persistence.Column; -import jakarta.persistence.Entity; -import jakarta.persistence.Id; -import lombok.Getter; - -@Entity -@Getter -public class Place { - /* - * 더미 데이터 입니다 !!! - */ - @Id - private Long id; - @Column - private String name; - - protected Place(){ - - } -} diff --git a/src/main/java/team7/inplace/video/entity/Video.java b/src/main/java/team7/inplace/video/entity/Video.java index da5fafd0..dee9f3b0 100644 --- a/src/main/java/team7/inplace/video/entity/Video.java +++ b/src/main/java/team7/inplace/video/entity/Video.java @@ -1,17 +1,26 @@ package team7.inplace.video.entity; -import jakarta.persistence.*; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; import lombok.Getter; import lombok.NoArgsConstructor; +import team7.inplace.influencer.domain.Influencer; +import team7.inplace.place.domain.Place; @Entity @Getter @NoArgsConstructor(access = lombok.AccessLevel.PROTECTED) public class Video { + @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; - @Column(name="video_url") + @Column(name = "video_url") private String videoUrl; @ManyToOne @JoinColumn(name = "influencer_id") diff --git a/src/main/java/team7/inplace/video/repository/InfluencerRepository.java b/src/main/java/team7/inplace/video/repository/InfluencerRepository.java deleted file mode 100644 index 7d7d12f6..00000000 --- a/src/main/java/team7/inplace/video/repository/InfluencerRepository.java +++ /dev/null @@ -1,15 +0,0 @@ -package team7.inplace.video.repository; - -import org.springframework.data.jpa.repository.JpaRepository; -import team7.inplace.video.entity.Influencer; - -import java.util.List; - -public interface InfluencerRepository extends JpaRepository { - // 더미 데이터 입니다!! - - @Override - List findAllById(Iterable longs); - - List findByNameIn(List names); -} diff --git a/src/main/java/team7/inplace/video/repository/VideoRepository.java b/src/main/java/team7/inplace/video/repository/VideoRepository.java index 7bc34a59..4904161d 100644 --- a/src/main/java/team7/inplace/video/repository/VideoRepository.java +++ b/src/main/java/team7/inplace/video/repository/VideoRepository.java @@ -3,8 +3,6 @@ import org.springframework.data.jpa.repository.JpaRepository; import team7.inplace.video.entity.Video; -import java.util.List; - public interface VideoRepository extends JpaRepository { - List