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;

/**
 * @author reghao
 * @date 2025-08-03 12:26:06
 */
@NoArgsConstructor
@Getter
@Setter
public class PlayComplete extends BaseObject<Integer> {
    @NotNull
    private Long userId;
    @NotBlank
    private String videoId;
    @NotNull
    // ms 时间戳
    private Long createAt;

    public PlayComplete(PlayRecord playRecord) {
        this.userId = playRecord.getUserId();
        this.videoId = playRecord.getVideoId();
        this.createAt = playRecord.getCreateAt();
    }
}
