ADD Clip Table
This commit is contained in:
49
src/main/java/com/ddf/vodsystem/entities/Clip.java
Normal file
49
src/main/java/com/ddf/vodsystem/entities/Clip.java
Normal file
@@ -0,0 +1,49 @@
|
||||
package com.ddf.vodsystem.entities;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
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)
|
||||
@ToString.Exclude
|
||||
@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 Integer fps;
|
||||
|
||||
@Column(name = "duration", nullable = false)
|
||||
private Integer duration;
|
||||
|
||||
@Column(name = "file_size", nullable = false)
|
||||
private Long fileSize;
|
||||
|
||||
@Column(name = "video_path", nullable = false, length = 255)
|
||||
private String videoPath;
|
||||
}
|
||||
Reference in New Issue
Block a user