From e862498f964c39b7f440138633fe13a6a83dea3c Mon Sep 17 00:00:00 2001 From: hehih Date: Sat, 30 May 2026 19:10:50 +0900 Subject: [PATCH] Remove dead legacy Video model cluster MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Video/VideoRepository/VideoService/VideoController (table 'videos', /api/v1/videos) were a legacy read-model with zero cross-package references. The active flows use ChannelVideo (collection→rework→publish) and YtVideo (Opal pipeline). Verified by clean compileJava. --- .claude/settings.local.json | 8 +++ .../com/hlab/yanalyst/domain/video/Video.java | 64 ------------------- .../domain/video/VideoController.java | 34 ---------- .../domain/video/VideoRepository.java | 13 ---- .../yanalyst/domain/video/VideoService.java | 26 -------- 5 files changed, 8 insertions(+), 137 deletions(-) create mode 100644 .claude/settings.local.json delete mode 100644 src/main/java/com/hlab/yanalyst/domain/video/Video.java delete mode 100644 src/main/java/com/hlab/yanalyst/domain/video/VideoController.java delete mode 100644 src/main/java/com/hlab/yanalyst/domain/video/VideoRepository.java delete mode 100644 src/main/java/com/hlab/yanalyst/domain/video/VideoService.java diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 0000000..e65f3da --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,8 @@ +{ + "permissions": { + "allow": [ + "PowerShell($env:JAVA_HOME=\"D:\\\\Development\\\\app\\\\JDK\\\\jdk-21.0.5\"; .\\\\gradlew.bat compileJava --console=plain 2>&1 | Select-Object -Last 15)", + "PowerShell($env:JAVA_HOME=\"D:\\\\Development\\\\app\\\\JDK\\\\jdk-21.0.5\"; .\\\\gradlew.bat clean compileJava --console=plain 2>&1 | Select-Object -Last 20)" + ] + } +} diff --git a/src/main/java/com/hlab/yanalyst/domain/video/Video.java b/src/main/java/com/hlab/yanalyst/domain/video/Video.java deleted file mode 100644 index 61bfe90..0000000 --- a/src/main/java/com/hlab/yanalyst/domain/video/Video.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.hlab.yanalyst.domain.video; - -import com.hlab.yanalyst.domain.channel.Channel; -import jakarta.persistence.*; -import lombok.AccessLevel; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import org.springframework.data.annotation.CreatedDate; -import org.springframework.data.jpa.domain.support.AuditingEntityListener; - -import java.time.LocalDateTime; - -@Entity -@Table(name = "videos") -@Getter -@NoArgsConstructor(access = AccessLevel.PROTECTED) -@EntityListeners(AuditingEntityListener.class) -public class Video { - - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - private Long id; - - @Column(nullable = false, unique = true) - private String videoId; // YouTube Video ID - - @Column(nullable = false) - private String title; - - @Column(columnDefinition = "TEXT") - private String description; - - private String thumbnailUrl; - - private String videoUrl; - - private Long viewCount; - - private Long likeCount; - - private LocalDateTime publishedAt; - - @ManyToOne(fetch = FetchType.LAZY) - @JoinColumn(name = "channel_id") - private Channel channel; - - @CreatedDate - @Column(updatable = false) - private LocalDateTime collectedAt; - - @Builder - public Video(String videoId, String title, String description, String thumbnailUrl, String videoUrl, Long viewCount, Long likeCount, LocalDateTime publishedAt, Channel channel) { - this.videoId = videoId; - this.title = title; - this.description = description; - this.thumbnailUrl = thumbnailUrl; - this.videoUrl = videoUrl; - this.viewCount = viewCount; - this.likeCount = likeCount; - this.publishedAt = publishedAt; - this.channel = channel; - } -} diff --git a/src/main/java/com/hlab/yanalyst/domain/video/VideoController.java b/src/main/java/com/hlab/yanalyst/domain/video/VideoController.java deleted file mode 100644 index ca93fda..0000000 --- a/src/main/java/com/hlab/yanalyst/domain/video/VideoController.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.hlab.yanalyst.domain.video; - -import com.hlab.yanalyst.global.common.ApiResponse; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import lombok.RequiredArgsConstructor; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.data.web.PageableDefault; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("/api/v1/videos") -@RequiredArgsConstructor -@Tag(name = "Video API", description = "Video Management API") -public class VideoController { - - private final VideoService videoService; - - @GetMapping - @Operation(summary = "Get all videos", description = "Retrieve a paginated list of videos.") - public ApiResponse> getVideos(@PageableDefault(size = 20) Pageable pageable) { - return ApiResponse.ok(videoService.getAllVideos(pageable)); - } - - @GetMapping("/{id}") - @Operation(summary = "Get video details", description = "Retrieve detailed information of a specific video.") - public ApiResponse