package com.ydtech.modules.admin.model.po; 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 io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import java.io.Serializable; import java.util.Date; /** * * @TableName kzt_data_permission */ @TableName(value ="kzt_data_permission") @Data @ApiModel(value = "数据权限") public class KztDataPermission implements Serializable { /** * 主键 */ @TableId(type = IdType.AUTO) @ApiModelProperty(value = "id") private Long id; /** * 菜单id */ @ApiModelProperty(value = "菜单id") @NotNull(message = "菜单id不能为空") private Long menuId; /** * 是否自定义脚本 */ @ApiModelProperty(value = "是否自定义脚本") @NotNull(message = "是否自定义脚本不能为空") private Integer customScriptFlag; /** * 数据权限字典id */ @ApiModelProperty(value = "数据权限字典id") private String dataPermissionId; /** * 自定义脚本内容 */ @ApiModelProperty(value = "自定义脚本内容") private String scriptContent; /** * 创建时间 */ @ApiModelProperty(value = "不用传后台生成") private Date createTime; /** * 访问的url */ @NotBlank(message = "访问的url不能为空") @ApiModelProperty(value = "访问的url") private String url; @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; } KztDataPermission other = (KztDataPermission) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getMenuId() == null ? other.getMenuId() == null : this.getMenuId().equals(other.getMenuId())) && (this.getCustomScriptFlag() == null ? other.getCustomScriptFlag() == null : this.getCustomScriptFlag().equals(other.getCustomScriptFlag())) && (this.getDataPermissionId() == null ? other.getDataPermissionId() == null : this.getDataPermissionId().equals(other.getDataPermissionId())) && (this.getScriptContent() == null ? other.getScriptContent() == null : this.getScriptContent().equals(other.getScriptContent())) && (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getMenuId() == null) ? 0 : getMenuId().hashCode()); result = prime * result + ((getCustomScriptFlag() == null) ? 0 : getCustomScriptFlag().hashCode()); result = prime * result + ((getDataPermissionId() == null) ? 0 : getDataPermissionId().hashCode()); result = prime * result + ((getScriptContent() == null) ? 0 : getScriptContent().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getUrl() == null) ? 0 : getUrl().hashCode()); return result; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", menuId=").append(menuId); sb.append(", customScriptFlag=").append(customScriptFlag); sb.append(", dataPermissionId=").append(dataPermissionId); sb.append(", scriptContent=").append(scriptContent); sb.append(", createTime=").append(createTime); sb.append(", url=").append(url); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); } }