package cn.reghao.tnb.content.app.vod.model.po;

import cn.reghao.jutil.jdk.web.db.BaseObject;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * @author reghao
 * @date 2024-04-06 22:31:16
 */
@NoArgsConstructor
@Setter
@Getter
public class BannerVideo extends BaseObject<Integer> {
    @NotNull
    private Long createAt;
    @NotBlank
    private String videoId;
    @NotBlank
    private String title;
    @NotBlank
    private String coverUrl;

    public BannerVideo(VideoPost videoPost, long createAt) {
        this.videoId = videoPost.getVideoId();
        this.title = videoPost.getTitle();
        this.coverUrl = videoPost.getCoverUrl();
        this.createAt = createAt;
    }
}
