|
|
@@ -0,0 +1,108 @@
|
|
|
+package com.ydtech.modules.admin.model;
|
|
|
+
|
|
|
+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 lombok.Data;
|
|
|
+import lombok.NoArgsConstructor;
|
|
|
+
|
|
|
+import java.io.Serializable;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 省市县代码
|
|
|
+ * @TableName sys_area
|
|
|
+ */
|
|
|
+@TableName(value ="sys_area")
|
|
|
+@NoArgsConstructor
|
|
|
+@Data
|
|
|
+public class SysArea implements Serializable {
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ */
|
|
|
+ @TableId(value = "id", type = IdType.AUTO)
|
|
|
+ private Integer id;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 地区代码
|
|
|
+ */
|
|
|
+ @TableField(value = "area_code")
|
|
|
+ private String areaCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 地区名称
|
|
|
+ */
|
|
|
+ @TableField(value = "area_cname")
|
|
|
+ private String areaCname;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 地区对应上级代码
|
|
|
+ */
|
|
|
+ @TableField(value = "upper_code")
|
|
|
+ private String upperCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否有效
|
|
|
+ */
|
|
|
+ @TableField(value = "valid_status")
|
|
|
+ private Integer validStatus;
|
|
|
+
|
|
|
+ @TableField(exist = false)
|
|
|
+ private static final long serialVersionUID = 1L;
|
|
|
+
|
|
|
+ public SysArea(SysArea sysArea) {
|
|
|
+ this.id = sysArea.id;
|
|
|
+ this.areaCode = sysArea.areaCode;
|
|
|
+ this.areaCname = sysArea.areaCname;
|
|
|
+ this.upperCode = sysArea.upperCode;
|
|
|
+ this.validStatus = sysArea.validStatus;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean equals(Object that) {
|
|
|
+ if (this == that) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ if (that == null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (getClass() != that.getClass()) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ SysArea other = (SysArea) that;
|
|
|
+ return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
|
|
+ && (this.getAreaCode() == null ? other.getAreaCode() == null : this.getAreaCode().equals(other.getAreaCode()))
|
|
|
+ && (this.getAreaCname() == null ? other.getAreaCname() == null : this.getAreaCname().equals(other.getAreaCname()))
|
|
|
+ && (this.getUpperCode() == null ? other.getUpperCode() == null : this.getUpperCode().equals(other.getUpperCode()))
|
|
|
+ && (this.getValidStatus() == null ? other.getValidStatus() == null : this.getValidStatus().equals(other.getValidStatus()));
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int hashCode() {
|
|
|
+ final int prime = 31;
|
|
|
+ int result = 1;
|
|
|
+ result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
|
|
+ result = prime * result + ((getAreaCode() == null) ? 0 : getAreaCode().hashCode());
|
|
|
+ result = prime * result + ((getAreaCname() == null) ? 0 : getAreaCname().hashCode());
|
|
|
+ result = prime * result + ((getUpperCode() == null) ? 0 : getUpperCode().hashCode());
|
|
|
+ result = prime * result + ((getValidStatus() == null) ? 0 : getValidStatus().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(", areaCode=").append(areaCode);
|
|
|
+ sb.append(", areaCname=").append(areaCname);
|
|
|
+ sb.append(", upperCode=").append(upperCode);
|
|
|
+ sb.append(", validStatus=").append(validStatus);
|
|
|
+ sb.append(", serialVersionUID=").append(serialVersionUID);
|
|
|
+ sb.append("]");
|
|
|
+ return sb.toString();
|
|
|
+ }
|
|
|
+}
|