package com.xinelu.manage.vo.nursestationperson;

import com.xinelu.manage.domain.nursestationperson.NurseStationPerson;
import com.xinelu.manage.domain.nursestationpersoncertificate.NurseStationPersonCertificate;
import lombok.Data;

import javax.validation.Valid;
import java.io.Serializable;
import java.util.List;
import java.util.Objects;

/**
 * @author ljh
 * @version 1.0
 * Create by 2022/9/15 9:21
 */
@Data
public class NurseStationPersonVO extends NurseStationPerson implements Serializable {
    private static final long serialVersionUID = -7039077248335435870L;

    /**
     * 护理员证书资质信息表集合
     **/
    @Valid
    private List<NurseStationPersonCertificate> nurseStationPersonCertificateList;

    /**
     * 护理站名称
     **/
    private String nurseStationName;

    /**
     * 护理站科室名称
     **/
    private String departmentName;

    /**
     * 联系电话
     */
    private String phone;

    /**
     * 主键id
     */
    private Long id;

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

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