package com.springboot.cloud.sysadmin.organization.entity.vo;

/*
 **********************************************
 *      DATE           PERSON       REASON
 *    2021-01-04          FXY        Created
 **********************************************
 */


import com.springboot.cloud.sysadmin.organization.entity.po.application.ApplicationPopedom;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.Objects;

@Data
public class Popedom extends ApplicationPopedom {
    private String companyId;

    public Popedom(ApplicationPopedom applicationPopedom, String companyId) {
        this.companyId = companyId;
        BeanUtils.copyProperties(applicationPopedom, this);
    }

    public Popedom(ApplicationPopedom applicationPopedom) {
        BeanUtils.copyProperties(applicationPopedom, this);
    }

    public Popedom(String companyId){
        this.companyId=companyId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Popedom)) return false;
        if (!super.equals(o)) return false;
        Popedom popedom = (Popedom) o;
        return Objects.equals(companyId, popedom.companyId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), companyId);
    }
}
