package cn.com.ctop.common.module.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Objects;

@Data
@TableName("sys_company")
public class SysCompany {

    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    private String companyId;

    private String companyCode;

    private String companyName;

    private String area;

    @Override
    public boolean equals(Object o) {
        if (this == o){
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        SysCompany that = (SysCompany) o;
        return id.equals(that.id) &&
                companyId.equals(that.companyId) &&
                companyCode.equals(that.companyCode) &&
                companyName.equals(that.companyName) &&
                area.equals(that.area);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, companyId, companyCode, companyName, area);
    }

    @Override
    public String toString() {
        return "SysCompany{" +
                "id=" + id +
                ", companyId='" + companyId + '\'' +
                ", companyCode='" + companyCode + '\'' +
                ", companyName='" + companyName + '\'' +
                ", area='" + area + '\'' +
                '}';
    }

}
