返回字段驼峰阀改为下划线

This commit is contained in:
none 2023-02-23 14:56:24 +08:00
parent 4dfd5518cb
commit ad3ff5ec41
8 changed files with 105 additions and 105 deletions

View File

@ -4,19 +4,21 @@ 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 admin_logs
*/
@TableName(value ="admin_logs")
@TableName(value = "admin_logs")
@Data
public class AdminLog implements Serializable {
/**
*
*
*/
@TableId(type = IdType.AUTO)
private Long id;
@ -24,6 +26,7 @@ public class AdminLog implements Serializable {
/**
* 管理员ID
*/
@JsonProperty("admin_id")
private Integer adminId;
/**
@ -49,11 +52,10 @@ public class AdminLog implements Serializable {
/**
* 地址
*/
@JsonProperty("ip_area")
private String ipArea;
/**
*
*/
@JsonProperty("created_at")
private Date createdAt;
@TableField(exist = false)
@ -72,13 +74,13 @@ public class AdminLog implements Serializable {
}
AdminLog other = (AdminLog) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getAdminId() == null ? other.getAdminId() == null : this.getAdminId().equals(other.getAdminId()))
&& (this.getModule() == null ? other.getModule() == null : this.getModule().equals(other.getModule()))
&& (this.getOpt() == null ? other.getOpt() == null : this.getOpt().equals(other.getOpt()))
&& (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
&& (this.getIp() == null ? other.getIp() == null : this.getIp().equals(other.getIp()))
&& (this.getIpArea() == null ? other.getIpArea() == null : this.getIpArea().equals(other.getIpArea()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()));
&& (this.getAdminId() == null ? other.getAdminId() == null : this.getAdminId().equals(other.getAdminId()))
&& (this.getModule() == null ? other.getModule() == null : this.getModule().equals(other.getModule()))
&& (this.getOpt() == null ? other.getOpt() == null : this.getOpt().equals(other.getOpt()))
&& (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
&& (this.getIp() == null ? other.getIp() == null : this.getIp().equals(other.getIp()))
&& (this.getIpArea() == null ? other.getIpArea() == null : this.getIpArea().equals(other.getIpArea()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()));
}
@Override

View File

@ -4,19 +4,21 @@ 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 admin_permissions
*/
@TableName(value ="admin_permissions")
@TableName(value = "admin_permissions")
@Data
public class AdminPermission implements Serializable {
/**
*
*
*/
@TableId(type = IdType.AUTO)
private Integer id;
@ -29,6 +31,7 @@ public class AdminPermission implements Serializable {
/**
* 分组
*/
@JsonProperty("group_name")
private String groupName;
/**
@ -46,9 +49,7 @@ public class AdminPermission implements Serializable {
*/
private String slug;
/**
*
*/
@JsonProperty("created_at")
private Date createdAt;
@TableField(exist = false)
@ -67,12 +68,12 @@ public class AdminPermission implements Serializable {
}
AdminPermission other = (AdminPermission) 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.getGroupName() == null ? other.getGroupName() == null : this.getGroupName().equals(other.getGroupName()))
&& (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getSlug() == null ? other.getSlug() == null : this.getSlug().equals(other.getSlug()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()));
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getGroupName() == null ? other.getGroupName() == null : this.getGroupName().equals(other.getGroupName()))
&& (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getSlug() == null ? other.getSlug() == null : this.getSlug().equals(other.getSlug()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()));
}
@Override

View File

@ -4,19 +4,21 @@ 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 admin_roles
*/
@TableName(value ="admin_roles")
@TableName(value = "admin_roles")
@Data
public class AdminRole implements Serializable {
/**
*
*
*/
@TableId(type = IdType.AUTO)
private Integer id;
@ -31,14 +33,10 @@ public class AdminRole implements Serializable {
*/
private String slug;
/**
*
*/
@JsonProperty("created_at")
private Date createdAt;
/**
*
*/
@JsonProperty("updated_at")
private Date updatedAt;
@TableField(exist = false)
@ -57,10 +55,10 @@ public class AdminRole implements Serializable {
}
AdminRole other = (AdminRole) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getSlug() == null ? other.getSlug() == null : this.getSlug().equals(other.getSlug()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
&& (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getSlug() == null ? other.getSlug() == null : this.getSlug().equals(other.getSlug()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
&& (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
}
@Override

View File

@ -2,24 +2,22 @@ package xyz.playedu.api.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
/**
*
* @TableName admin_role_permission
*/
@TableName(value ="admin_role_permission")
@TableName(value = "admin_role_permission")
@Data
public class AdminRolePermission implements Serializable {
/**
*
*/
@JsonProperty("role_id")
private Integer roleId;
/**
*
*/
@JsonProperty("perm_id")
private Integer permId;
@TableField(exist = false)
@ -38,7 +36,7 @@ public class AdminRolePermission implements Serializable {
}
AdminRolePermission other = (AdminRolePermission) that;
return (this.getRoleId() == null ? other.getRoleId() == null : this.getRoleId().equals(other.getRoleId()))
&& (this.getPermId() == null ? other.getPermId() == null : this.getPermId().equals(other.getPermId()));
&& (this.getPermId() == null ? other.getPermId() == null : this.getPermId().equals(other.getPermId()));
}
@Override

View File

@ -4,21 +4,22 @@ 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 admin_users
*/
@TableName(value ="admin_users")
@TableName(value = "admin_users")
@Data
public class AdminUser implements Serializable {
/**
*
*
*/
@TableId(type = IdType.AUTO)
private Integer id;
@ -48,31 +49,31 @@ public class AdminUser implements Serializable {
/**
* 登录IP
*/
@JsonProperty("login_ip")
private String loginIp;
/**
* 登录时间
*/
@JsonProperty("login_at")
private Date loginAt;
/**
* 1禁止登录,0否
*/
@JsonProperty("is_ban_login")
private Integer isBanLogin;
/**
* 登录次数
*/
@JsonProperty("login_times")
private Integer loginTimes;
/**
*
*/
@JsonProperty("created_at")
private Date createdAt;
/**
*
*/
@JsonProperty("updated_at")
private Date updatedAt;
@TableField(exist = false)
@ -91,16 +92,16 @@ public class AdminUser implements Serializable {
}
AdminUser other = (AdminUser) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
&& (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
&& (this.getSalt() == null ? other.getSalt() == null : this.getSalt().equals(other.getSalt()))
&& (this.getLoginIp() == null ? other.getLoginIp() == null : this.getLoginIp().equals(other.getLoginIp()))
&& (this.getLoginAt() == null ? other.getLoginAt() == null : this.getLoginAt().equals(other.getLoginAt()))
&& (this.getIsBanLogin() == null ? other.getIsBanLogin() == null : this.getIsBanLogin().equals(other.getIsBanLogin()))
&& (this.getLoginTimes() == null ? other.getLoginTimes() == null : this.getLoginTimes().equals(other.getLoginTimes()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
&& (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
&& (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
&& (this.getSalt() == null ? other.getSalt() == null : this.getSalt().equals(other.getSalt()))
&& (this.getLoginIp() == null ? other.getLoginIp() == null : this.getLoginIp().equals(other.getLoginIp()))
&& (this.getLoginAt() == null ? other.getLoginAt() == null : this.getLoginAt().equals(other.getLoginAt()))
&& (this.getIsBanLogin() == null ? other.getIsBanLogin() == null : this.getIsBanLogin().equals(other.getIsBanLogin()))
&& (this.getLoginTimes() == null ? other.getLoginTimes() == null : this.getLoginTimes().equals(other.getLoginTimes()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
&& (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
}
@Override

View File

@ -2,24 +2,22 @@ package xyz.playedu.api.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
/**
*
* @TableName admin_user_role
*/
@TableName(value ="admin_user_role")
@TableName(value = "admin_user_role")
@Data
public class AdminUserRole implements Serializable {
/**
*
*/
@JsonProperty("admin_id")
private Integer adminId;
/**
*
*/
@JsonProperty("role_id")
private Integer roleId;
@TableField(exist = false)
@ -38,7 +36,7 @@ public class AdminUserRole implements Serializable {
}
AdminUserRole other = (AdminUserRole) that;
return (this.getAdminId() == null ? other.getAdminId() == null : this.getAdminId().equals(other.getAdminId()))
&& (this.getRoleId() == null ? other.getRoleId() == null : this.getRoleId().equals(other.getRoleId()));
&& (this.getRoleId() == null ? other.getRoleId() == null : this.getRoleId().equals(other.getRoleId()));
}
@Override

View File

@ -4,19 +4,21 @@ 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 departments
*/
@TableName(value ="departments")
@TableName(value = "departments")
@Data
public class Department implements Serializable {
/**
*
*
*/
@TableId(type = IdType.AUTO)
private Integer id;
@ -29,11 +31,13 @@ public class Department implements Serializable {
/**
* 父id
*/
@JsonProperty("parent_id")
private Integer parentId;
/**
* 父链
*/
@JsonProperty("parent_chain")
private String parentChain;
/**
@ -41,14 +45,10 @@ public class Department implements Serializable {
*/
private Integer sort;
/**
*
*/
@JsonProperty("created_at")
private Date createdAt;
/**
*
*/
@JsonProperty("updated_at")
private Date updatedAt;
@TableField(exist = false)
@ -67,12 +67,12 @@ public class Department implements Serializable {
}
Department other = (Department) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
&& (this.getParentChain() == null ? other.getParentChain() == null : this.getParentChain().equals(other.getParentChain()))
&& (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
&& (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
&& (this.getParentChain() == null ? other.getParentChain() == null : this.getParentChain().equals(other.getParentChain()))
&& (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
&& (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
}
@Override

View File

@ -4,19 +4,21 @@ 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 resources
*/
@TableName(value ="resources")
@TableName(value = "resources")
@Data
public class Resource implements Serializable {
/**
*
*
*/
@TableId(type = IdType.AUTO)
private Long id;
@ -24,6 +26,7 @@ public class Resource implements Serializable {
/**
* 分类id
*/
@JsonProperty("category_id")
private Integer categoryId;
/**
@ -49,6 +52,7 @@ public class Resource implements Serializable {
/**
* 文件id
*/
@JsonProperty("file_id")
private String fileId;
/**
@ -61,9 +65,7 @@ public class Resource implements Serializable {
*/
private String url;
/**
*
*/
@JsonProperty("created_at")
private Date createdAt;
@TableField(exist = false)
@ -82,15 +84,15 @@ public class Resource implements Serializable {
}
Resource other = (Resource) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId().equals(other.getCategoryId()))
&& (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.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId().equals(other.getCategoryId()))
&& (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()));
}
@Override