package com.bailuntec.domain.entity;

import lombok.Data;

import java.math.BigDecimal;

@Data
public class DcMidCostFirstOrder {
    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dc_mid_cost_first_order.id
     *
     * @mbg.generated
     */
    private Integer id;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dc_mid_cost_first_order.cost_first
     *
     * @mbg.generated
     */
    private BigDecimal costFirst;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dc_mid_cost_first_order.bailun_sku
     *
     * @mbg.generated
     */
    private String bailunSku;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dc_mid_cost_first_order.warehouse_code
     *
     * @mbg.generated
     */
    private String warehouseCode;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dc_mid_cost_first_order.channel_order_id
     *
     * @mbg.generated
     */
    private String channelOrderId;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dc_mid_cost_first_order.weight_ratio
     *
     * @mbg.generated
     */
    private BigDecimal weightRatio;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dc_mid_cost_first_order.quantity
     *
     * @mbg.generated
     */
    private Integer quantity;

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_mid_cost_first_order
     *
     * @mbg.generated
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", costFirst=").append(costFirst);
        sb.append(", bailunSku=").append(bailunSku);
        sb.append(", warehouseCode=").append(warehouseCode);
        sb.append(", channelOrderId=").append(channelOrderId);
        sb.append(", weightRatio=").append(weightRatio);
        sb.append(", quantity=").append(quantity);
        sb.append("]");
        return sb.toString();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_mid_cost_first_order
     *
     * @mbg.generated
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DcMidCostFirstOrder other = (DcMidCostFirstOrder) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCostFirst() == null ? other.getCostFirst() == null : this.getCostFirst().equals(other.getCostFirst()))
            && (this.getBailunSku() == null ? other.getBailunSku() == null : this.getBailunSku().equals(other.getBailunSku()))
            && (this.getWarehouseCode() == null ? other.getWarehouseCode() == null : this.getWarehouseCode().equals(other.getWarehouseCode()))
            && (this.getChannelOrderId() == null ? other.getChannelOrderId() == null : this.getChannelOrderId().equals(other.getChannelOrderId()))
            && (this.getWeightRatio() == null ? other.getWeightRatio() == null : this.getWeightRatio().equals(other.getWeightRatio()))
            && (this.getQuantity() == null ? other.getQuantity() == null : this.getQuantity().equals(other.getQuantity()));
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_mid_cost_first_order
     *
     * @mbg.generated
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCostFirst() == null) ? 0 : getCostFirst().hashCode());
        result = prime * result + ((getBailunSku() == null) ? 0 : getBailunSku().hashCode());
        result = prime * result + ((getWarehouseCode() == null) ? 0 : getWarehouseCode().hashCode());
        result = prime * result + ((getChannelOrderId() == null) ? 0 : getChannelOrderId().hashCode());
        result = prime * result + ((getWeightRatio() == null) ? 0 : getWeightRatio().hashCode());
        result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
        return result;
    }
}