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

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

View File

@ -4,19 +4,21 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;
/** /**
*
* @TableName admin_permissions * @TableName admin_permissions
*/ */
@TableName(value ="admin_permissions") @TableName(value = "admin_permissions")
@Data @Data
public class AdminPermission implements Serializable { public class AdminPermission implements Serializable {
/** /**
* *
*/ */
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
@ -29,6 +31,7 @@ public class AdminPermission implements Serializable {
/** /**
* 分组 * 分组
*/ */
@JsonProperty("group_name")
private String groupName; private String groupName;
/** /**
@ -46,9 +49,7 @@ public class AdminPermission implements Serializable {
*/ */
private String slug; private String slug;
/** @JsonProperty("created_at")
*
*/
private Date createdAt; private Date createdAt;
@TableField(exist = false) @TableField(exist = false)
@ -67,12 +68,12 @@ public class AdminPermission implements Serializable {
} }
AdminPermission other = (AdminPermission) that; AdminPermission other = (AdminPermission) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getGroupName() == null ? other.getGroupName() == null : this.getGroupName().equals(other.getGroupName())) && (this.getGroupName() == null ? other.getGroupName() == null : this.getGroupName().equals(other.getGroupName()))
&& (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort())) && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getSlug() == null ? other.getSlug() == null : this.getSlug().equals(other.getSlug())) && (this.getSlug() == null ? other.getSlug() == null : this.getSlug().equals(other.getSlug()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt())); && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()));
} }
@Override @Override

View File

@ -4,19 +4,21 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;
/** /**
*
* @TableName admin_roles * @TableName admin_roles
*/ */
@TableName(value ="admin_roles") @TableName(value = "admin_roles")
@Data @Data
public class AdminRole implements Serializable { public class AdminRole implements Serializable {
/** /**
* *
*/ */
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
@ -31,14 +33,10 @@ public class AdminRole implements Serializable {
*/ */
private String slug; private String slug;
/** @JsonProperty("created_at")
*
*/
private Date createdAt; private Date createdAt;
/** @JsonProperty("updated_at")
*
*/
private Date updatedAt; private Date updatedAt;
@TableField(exist = false) @TableField(exist = false)
@ -57,10 +55,10 @@ public class AdminRole implements Serializable {
} }
AdminRole other = (AdminRole) that; AdminRole other = (AdminRole) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getSlug() == null ? other.getSlug() == null : this.getSlug().equals(other.getSlug())) && (this.getSlug() == null ? other.getSlug() == null : this.getSlug().equals(other.getSlug()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt())) && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
&& (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt())); && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
} }
@Override @Override

View File

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

View File

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

View File

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

View File

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

View File

@ -4,19 +4,21 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;
/** /**
*
* @TableName resources * @TableName resources
*/ */
@TableName(value ="resources") @TableName(value = "resources")
@Data @Data
public class Resource implements Serializable { public class Resource implements Serializable {
/** /**
* *
*/ */
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Long id; private Long id;
@ -24,6 +26,7 @@ public class Resource implements Serializable {
/** /**
* 分类id * 分类id
*/ */
@JsonProperty("category_id")
private Integer categoryId; private Integer categoryId;
/** /**
@ -49,6 +52,7 @@ public class Resource implements Serializable {
/** /**
* 文件id * 文件id
*/ */
@JsonProperty("file_id")
private String fileId; private String fileId;
/** /**
@ -61,9 +65,7 @@ public class Resource implements Serializable {
*/ */
private String url; private String url;
/** @JsonProperty("created_at")
*
*/
private Date createdAt; private Date createdAt;
@TableField(exist = false) @TableField(exist = false)
@ -82,15 +84,15 @@ public class Resource implements Serializable {
} }
Resource other = (Resource) that; Resource other = (Resource) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId().equals(other.getCategoryId())) && (this.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId().equals(other.getCategoryId()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getExtension() == null ? other.getExtension() == null : this.getExtension().equals(other.getExtension())) && (this.getExtension() == null ? other.getExtension() == null : this.getExtension().equals(other.getExtension()))
&& (this.getSize() == null ? other.getSize() == null : this.getSize().equals(other.getSize())) && (this.getSize() == null ? other.getSize() == null : this.getSize().equals(other.getSize()))
&& (this.getDisk() == null ? other.getDisk() == null : this.getDisk().equals(other.getDisk())) && (this.getDisk() == null ? other.getDisk() == null : this.getDisk().equals(other.getDisk()))
&& (this.getFileId() == null ? other.getFileId() == null : this.getFileId().equals(other.getFileId())) && (this.getFileId() == null ? other.getFileId() == null : this.getFileId().equals(other.getFileId()))
&& (this.getPath() == null ? other.getPath() == null : this.getPath().equals(other.getPath())) && (this.getPath() == null ? other.getPath() == null : this.getPath().equals(other.getPath()))
&& (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl())) && (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt())); && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()));
} }
@Override @Override