package com.hlab.yanalyst.domain.channel; import jakarta.persistence.*; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import org.hibernate.annotations.CreationTimestamp; import org.hibernate.annotations.UpdateTimestamp; import java.time.LocalDateTime; /** 자동 발굴된 추천 채널(떡상 Shorts 기반). status: NEW|REGISTERED|EXCLUDED. */ @Entity @Table(name = "recommended_channels") @Getter @Setter @NoArgsConstructor public class RecommendedChannel { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column(nullable = false, unique = true) private String channelId; private String channelTitle; @Column(length = 2083) private String thumbnailUrl; // 대표 떡상 영상의 썸네일 private Long subscriberCount; @Column(nullable = false) private String status = "NEW"; // 대표(최고 배율) 영상 private String topVideoId; @Column(length = 500) private String topVideoTitle; private Long topVideoViewCount; private Double ratio; // topVideo viewCount / subscriberCount private String region; // 발견 지역(KR/JP/US) /** * 승인 시 부여할 역할 힌트: SOURCE(소재 원본 웹예능) | RIVAL(경쟁 쇼츠) | null(기존 떡상 발굴 = 내 채널 후보). * 시드 역분석으로 찾은 후보인지, 기존 떡상 발굴로 찾은 후보인지 구분한다. */ @Column(length = 10) private String roleHint; /** 이 후보를 찾아낸 근거 키워드(내 채널 해시태그). */ private String seedKeyword; @CreationTimestamp @Column(updatable = false) private LocalDateTime discoveredAt; @UpdateTimestamp private LocalDateTime updatedAt; }