package com.bailuntec.domain.entity;

import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

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

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

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

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

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dc_average_purchase.supplier_name
     *
     * @mbg.generated
     */
    private String supplierName;

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

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

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

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dc_average_purchase.update_time
     *
     * @mbg.generated
     */
    private LocalDateTime updateTime;

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

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_average_purchase
     *
     * @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(", bailunSku=").append(bailunSku);
        sb.append(", warehouseCode=").append(warehouseCode);
        sb.append(", supplierId=").append(supplierId);
        sb.append(", supplierName=").append(supplierName);
        sb.append(", price=").append(price);
        sb.append(", deliveryDays=").append(deliveryDays);
        sb.append(", inboundDays=").append(inboundDays);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", paymentType=").append(paymentType);
        sb.append("]");
        return sb.toString();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_average_purchase
     *
     * @mbg.generated
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DcAveragePurchase other = (DcAveragePurchase) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getBailunSku() == null ? other.getBailunSku() == null : this.getBailunSku().equals(other.getBailunSku()))
            && (this.getWarehouseCode() == null ? other.getWarehouseCode() == null : this.getWarehouseCode().equals(other.getWarehouseCode()))
            && (this.getSupplierId() == null ? other.getSupplierId() == null : this.getSupplierId().equals(other.getSupplierId()))
            && (this.getSupplierName() == null ? other.getSupplierName() == null : this.getSupplierName().equals(other.getSupplierName()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getDeliveryDays() == null ? other.getDeliveryDays() == null : this.getDeliveryDays().equals(other.getDeliveryDays()))
            && (this.getInboundDays() == null ? other.getInboundDays() == null : this.getInboundDays().equals(other.getInboundDays()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getPaymentType() == null ? other.getPaymentType() == null : this.getPaymentType().equals(other.getPaymentType()));
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_average_purchase
     *
     * @mbg.generated
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getBailunSku() == null) ? 0 : getBailunSku().hashCode());
        result = prime * result + ((getWarehouseCode() == null) ? 0 : getWarehouseCode().hashCode());
        result = prime * result + ((getSupplierId() == null) ? 0 : getSupplierId().hashCode());
        result = prime * result + ((getSupplierName() == null) ? 0 : getSupplierName().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getDeliveryDays() == null) ? 0 : getDeliveryDays().hashCode());
        result = prime * result + ((getInboundDays() == null) ? 0 : getInboundDays().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getPaymentType() == null) ? 0 : getPaymentType().hashCode());
        return result;
    }
}