package com.bonus.sgzb.base.domain;

import com.bonus.sgzb.common.core.annotation.Excel;
import com.bonus.sgzb.common.core.web.domain.BaseEntity;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Objects;

/**
 * 配件类型管理ma_part_type(MaPartType)表实体类
 *
 * @author makejava
 * @since 2023-11-27 16:44:09
 */
@SuppressWarnings("serial")
@Data
public class MapType extends BaseEntity {

    //类型名称
    @Excel(name = "类型名称")
    private String paName;

    //计量单位ID
    @Excel(name = "计量单位ID")
    private String unitId;

    //原值
    @Excel(name = "原值")
    private BigDecimal buyPrice;


    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MapType mapType = (MapType) o;
        return Objects.equals(paName, mapType.paName) &&
                Objects.equals(unitId, mapType.unitId) &&
                Objects.equals(buyPrice, mapType.buyPrice);
    }

    @Override
    public int hashCode() {
        return Objects.hash(paName, unitId, buyPrice);
    }

}

