package com.bailuntec.domain.entity;

import lombok.Data;

import java.time.LocalDateTime;

@Data
public class TOrderProductKey {
    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_order_product.Id
     *
     * @mbg.generated
     */
    private Long id;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column t_order_product.PayTime
     *
     * @mbg.generated
     */
    private LocalDateTime paytime;

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

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table t_order_product
     *
     * @mbg.generated
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TOrderProductKey other = (TOrderProductKey) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPaytime() == null ? other.getPaytime() == null : this.getPaytime().equals(other.getPaytime()));
    }

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