51 lines
1.2 KiB
Java
51 lines
1.2 KiB
Java
package com.ddf.vodsystem.entities;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
import jakarta.persistence.*;
|
|
import lombok.Data;
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
@Entity
|
|
@Table(name = "clips")
|
|
@Data
|
|
public class Clip {
|
|
@Id
|
|
@Column(name = "id", nullable = false, unique = true)
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
private Long id;
|
|
|
|
@ManyToOne(fetch = FetchType.LAZY)
|
|
@JsonIgnore
|
|
@JoinColumn(name = "user_id", nullable = false)
|
|
private User user;
|
|
|
|
@Column(name = "title", nullable = false, length = 255)
|
|
private String title;
|
|
|
|
@Column(name = "description")
|
|
private String description;
|
|
|
|
@Column(name = "created_at")
|
|
private LocalDateTime createdAt;
|
|
|
|
@Column(name = "width", nullable = false)
|
|
private Integer width;
|
|
|
|
@Column(name = "height", nullable = false)
|
|
private Integer height;
|
|
|
|
@Column(name = "fps", nullable = false)
|
|
private Float fps;
|
|
|
|
@Column(name = "duration", nullable = false)
|
|
private Float duration;
|
|
|
|
@Column(name = "file_size", nullable = false)
|
|
private Float fileSize;
|
|
|
|
@Column(name = "video_path", nullable = false, length = 255)
|
|
private String videoPath;
|
|
}
|