package com.xinelu.manage.dto.agency;

import com.xinelu.common.annotation.Excel;
import com.xinelu.manage.domain.agency.Agency;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Objects;


@Data
public class AgencyDTO extends Agency {

    @Excel(name = "上级机构代码")
    private String parentAgencyCode;


    /**
     * 机构名称
     */
    @ApiModelProperty(value = "机构名称")
    @Excel(name = "机构名称(必填)")
    private String agencyName;

    /**
     * 类别编码
     */
    @ApiModelProperty(value = "类别编码")
    @Excel(name = "所属机构类别编码")
    private String categoryCode;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        AgencyDTO that = (AgencyDTO) o;
        return Objects.equals(agencyName, that.agencyName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(agencyName);
    }
}