package com.bailuntec.domain.entity;

import lombok.Data;

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

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

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dc_exchange_rate.init_curreny
     *
     * @mbg.generated
     */
    private String initCurreny;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dc_exchange_rate.final_curreny
     *
     * @mbg.generated
     */
    private String finalCurreny;

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

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dc_exchange_rate.record_time
     *
     * @mbg.generated
     */
    private LocalDate recordTime;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dc_exchange_rate.gmt_create
     *
     * @mbg.generated
     */
    private LocalDateTime gmtCreate;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column dc_exchange_rate.gmt_modified
     *
     * @mbg.generated
     */
    private LocalDateTime gmtModified;

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_exchange_rate
     *
     * @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(", initCurreny=").append(initCurreny);
        sb.append(", finalCurreny=").append(finalCurreny);
        sb.append(", exchangeRate=").append(exchangeRate);
        sb.append(", recordTime=").append(recordTime);
        sb.append(", gmtCreate=").append(gmtCreate);
        sb.append(", gmtModified=").append(gmtModified);
        sb.append("]");
        return sb.toString();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_exchange_rate
     *
     * @mbg.generated
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DcExchangeRate other = (DcExchangeRate) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getInitCurreny() == null ? other.getInitCurreny() == null : this.getInitCurreny().equals(other.getInitCurreny()))
            && (this.getFinalCurreny() == null ? other.getFinalCurreny() == null : this.getFinalCurreny().equals(other.getFinalCurreny()))
            && (this.getExchangeRate() == null ? other.getExchangeRate() == null : this.getExchangeRate().equals(other.getExchangeRate()))
            && (this.getRecordTime() == null ? other.getRecordTime() == null : this.getRecordTime().equals(other.getRecordTime()))
            && (this.getGmtCreate() == null ? other.getGmtCreate() == null : this.getGmtCreate().equals(other.getGmtCreate()))
            && (this.getGmtModified() == null ? other.getGmtModified() == null : this.getGmtModified().equals(other.getGmtModified()));
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table dc_exchange_rate
     *
     * @mbg.generated
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getInitCurreny() == null) ? 0 : getInitCurreny().hashCode());
        result = prime * result + ((getFinalCurreny() == null) ? 0 : getFinalCurreny().hashCode());
        result = prime * result + ((getExchangeRate() == null) ? 0 : getExchangeRate().hashCode());
        result = prime * result + ((getRecordTime() == null) ? 0 : getRecordTime().hashCode());
        result = prime * result + ((getGmtCreate() == null) ? 0 : getGmtCreate().hashCode());
        result = prime * result + ((getGmtModified() == null) ? 0 : getGmtModified().hashCode());
        return result;
    }
}