Subversion Repositories SmartDukaan

Rev

Blame | Last modification | View Log | RSS feed

package com.spice.profitmandi.dao.model;

import java.time.LocalDateTime;
import java.util.Objects;

public class BrandWiseReturnInfo {
    int retailerId;
    String brand;
    LocalDateTime receivedAt;
    double returnAmount;

    public BrandWiseReturnInfo(int retailerId, String brand, LocalDateTime receivedAt, double returnAmount) {
        this.retailerId = retailerId;
        this.brand = brand;
        this.receivedAt = receivedAt;
        this.returnAmount = returnAmount;
    }

    public int getRetailerId() {
        return retailerId;
    }

    public void setRetailerId(int retailerId) {
        this.retailerId = retailerId;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public LocalDateTime getReceivedAt() {
        return receivedAt;
    }

    public void setReceivedAt(LocalDateTime receivedAt) {
        this.receivedAt = receivedAt;
    }

    public double getReturnAmount() {
        return returnAmount;
    }

    public void setReturnAmount(double returnAmount) {
        this.returnAmount = returnAmount;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BrandWiseReturnInfo that = (BrandWiseReturnInfo) o;
        return retailerId == that.retailerId && Double.compare(returnAmount, that.returnAmount) == 0 && Objects.equals(brand, that.brand) && Objects.equals(receivedAt, that.receivedAt);
    }

    @Override
    public int hashCode() {
        return Objects.hash(retailerId, brand, receivedAt, returnAmount);
    }

    @Override
    public String toString() {
        return "BrandWiseReturnInfo{" +
                "retailerId=" + retailerId +
                ", brand='" + brand + '\'' +
                ", receivedAt=" + receivedAt +
                ", returnAmount=" + returnAmount +
                '}';
    }
}