mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-26 04:39:26 +08:00
资源增加admin_id
This commit is contained in:
@@ -4,25 +4,32 @@ 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.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @TableName resources
|
||||
*/
|
||||
@TableName(value = "resources")
|
||||
@TableName(value ="resources")
|
||||
@Data
|
||||
public class Resource implements Serializable {
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@JsonProperty("admin_id")
|
||||
private Integer adminId;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@@ -64,16 +71,22 @@ public class Resource implements Serializable {
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@JsonProperty("created_at")
|
||||
private Date createdAt;
|
||||
|
||||
/**
|
||||
* 所属素材
|
||||
*/
|
||||
@JsonProperty("parent_id")
|
||||
private Integer parentId;
|
||||
|
||||
/**
|
||||
* 隐藏[0:否,1:是]
|
||||
*/
|
||||
@JsonProperty("is_hidden")
|
||||
@JsonIgnore
|
||||
private Integer isHidden;
|
||||
|
||||
@TableField(exist = false)
|
||||
@@ -92,17 +105,18 @@ public class Resource implements Serializable {
|
||||
}
|
||||
Resource other = (Resource) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
|
||||
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
|
||||
&& (this.getExtension() == null ? other.getExtension() == null : this.getExtension().equals(other.getExtension()))
|
||||
&& (this.getSize() == null ? other.getSize() == null : this.getSize().equals(other.getSize()))
|
||||
&& (this.getDisk() == null ? other.getDisk() == null : this.getDisk().equals(other.getDisk()))
|
||||
&& (this.getFileId() == null ? other.getFileId() == null : this.getFileId().equals(other.getFileId()))
|
||||
&& (this.getPath() == null ? other.getPath() == null : this.getPath().equals(other.getPath()))
|
||||
&& (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl()))
|
||||
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
|
||||
&& (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
|
||||
&& (this.getIsHidden() == null ? other.getIsHidden() == null : this.getIsHidden().equals(other.getIsHidden()));
|
||||
&& (this.getAdminId() == null ? other.getAdminId() == null : this.getAdminId().equals(other.getAdminId()))
|
||||
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
|
||||
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
|
||||
&& (this.getExtension() == null ? other.getExtension() == null : this.getExtension().equals(other.getExtension()))
|
||||
&& (this.getSize() == null ? other.getSize() == null : this.getSize().equals(other.getSize()))
|
||||
&& (this.getDisk() == null ? other.getDisk() == null : this.getDisk().equals(other.getDisk()))
|
||||
&& (this.getFileId() == null ? other.getFileId() == null : this.getFileId().equals(other.getFileId()))
|
||||
&& (this.getPath() == null ? other.getPath() == null : this.getPath().equals(other.getPath()))
|
||||
&& (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl()))
|
||||
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
|
||||
&& (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
|
||||
&& (this.getIsHidden() == null ? other.getIsHidden() == null : this.getIsHidden().equals(other.getIsHidden()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -110,6 +124,7 @@ public class Resource implements Serializable {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getAdminId() == null) ? 0 : getAdminId().hashCode());
|
||||
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
|
||||
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
|
||||
result = prime * result + ((getExtension() == null) ? 0 : getExtension().hashCode());
|
||||
@@ -131,6 +146,7 @@ public class Resource implements Serializable {
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", adminId=").append(adminId);
|
||||
sb.append(", type=").append(type);
|
||||
sb.append(", name=").append(name);
|
||||
sb.append(", extension=").append(extension);
|
||||
|
||||
Reference in New Issue
Block a user