mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-26 04:39:26 +08:00
资源video的时长记录
This commit is contained in:
@@ -21,7 +21,7 @@ public class Resource implements Serializable {
|
||||
*
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 分类id
|
||||
|
||||
76
src/main/java/xyz/playedu/api/domain/ResourceVideo.java
Normal file
76
src/main/java/xyz/playedu/api/domain/ResourceVideo.java
Normal file
@@ -0,0 +1,76 @@
|
||||
package xyz.playedu.api.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @TableName resource_videos
|
||||
*/
|
||||
@TableName(value ="resource_videos")
|
||||
@Data
|
||||
public class ResourceVideo implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer rid;
|
||||
|
||||
/**
|
||||
* 视频时长[s]
|
||||
*/
|
||||
private Integer duration;
|
||||
|
||||
@JsonProperty("created_at")
|
||||
private Date createdAt;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ResourceVideo other = (ResourceVideo) that;
|
||||
return (this.getRid() == null ? other.getRid() == null : this.getRid().equals(other.getRid()))
|
||||
&& (this.getDuration() == null ? other.getDuration() == null : this.getDuration().equals(other.getDuration()))
|
||||
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getRid() == null) ? 0 : getRid().hashCode());
|
||||
result = prime * result + ((getDuration() == null) ? 0 : getDuration().hashCode());
|
||||
result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", rid=").append(rid);
|
||||
sb.append(", duration=").append(duration);
|
||||
sb.append(", createdAt=").append(createdAt);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user