package de.thpeetz.kontor.models.media;

import java.util.Date;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import jakarta.persistence.UniqueConstraint;
import jakarta.persistence.Version;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
@Entity
@Table(name = "media_video", uniqueConstraints = { @UniqueConstraint(columnNames = { "url" }) })
public class MediaVideo {

    @Id
    @GeneratedValue(strategy = GenerationType.UUID)
    private String id;

    @Version
    private int version;

    @Column(name = "created_date")
    private Date createdDate;

    @Column(name = "last_modified_date", nullable = true)
    private Date lastModifiedDate;

    @Column
    private String url;

    @Column
    private boolean review;

    @Column(name = "should_download")
    private boolean shouldDownload;

    @Column(nullable = true)
    private String title;

    @Column(name = "cloud_link", nullable = true)
    private String cloudLink;

    @Column(name = "file_name", nullable = true)
    private String fileName;

    @Column(nullable = true)
    private String path;
}
