You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
3.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.rabbiter.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ApiModel(value="User对象", description="")
public class User implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "账号")
private String no;
@ApiModelProperty(value = "名字")
private String name;
@ApiModelProperty(value = "密码")
private String password;
private Integer age;
@ApiModelProperty(value = "性别")
private Integer sex;
@ApiModelProperty(value = "电话")
private String phone;
@ApiModelProperty(value = "角色 0快递员管理1快递员2用户")
private Integer roleId;
@ApiModelProperty(value = "是否有效Y有效其他无效")
@TableField("isValid")
private String isvalid;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getNo() {
return no;
}
public void setNo(String no) {
this.no = no;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
public Integer getSex() {
return sex;
}
public void setSex(Integer sex) {
this.sex = sex;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public Integer getRoleId() {
return roleId;
}
public void setRoleId(Integer roleId) {
this.roleId = roleId;
}
public String getIsvalid() {
return isvalid;
}
public void setIsvalid(String isvalid) {
this.isvalid = isvalid;
}
// 新增的 getUsername 方法
public String getUsername() {
return this.no;
}
@Override
public String toString() {
return "User{" +
"id=" + id +
", no='" + no + '\'' +
", name='" + name + '\'' +
", password='" + password + '\'' +
", age=" + age +
", sex=" + sex +
", phone='" + phone + '\'' +
", roleId=" + roleId +
", isvalid='" + isvalid + '\'' +
'}';
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
User user = (User) o;
return Objects.equals(id, user.id) && Objects.equals(no, user.no) && Objects.equals(name, user.name) && Objects.equals(password, user.password) && Objects.equals(age, user.age) && Objects.equals(sex, user.sex) && Objects.equals(phone, user.phone) && Objects.equals(roleId, user.roleId) && Objects.equals(isvalid, user.isvalid);
}
@Override
public int hashCode() {
return Objects.hash(id, no, name, password, age, sex, phone, roleId, isvalid);
}
}