Subversion Repositories SmartDukaan

Rev

Rev 33715 | Rev 33719 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.spice.profitmandi.dao.entity.fofo;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Objects;

/**
 * @author amit
 */
@Entity
@Table(name = "fofo.upSaleOrder")
public class UpSaleOrder implements Serializable {


    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;

    @Column(name = "orderId")
    private int orderId;

    @Column(name = "fofoId")
    private int fofoId;

    @Column(name = "create_timestamp")
    private LocalDateTime createdTimestamp = LocalDateTime.now();

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getOrderId() {
        return orderId;
    }

    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }

    public LocalDateTime getCreatedTimestamp() {
        return createdTimestamp;
    }

    public void setCreatedTimestamp(LocalDateTime createdTimestamp) {
        this.createdTimestamp = createdTimestamp;
    }

    public int getFofoId() {
        return fofoId;
    }

    public void setFofoId(int fofoId) {
        this.fofoId = fofoId;
    }

    @Override
    public String toString() {
        return "UpSaleOrder{" +
                "id=" + id +
                ", orderId=" + orderId +
                ", fofoId=" + fofoId +
                ", createdTimestamp=" + createdTimestamp +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UpSaleOrder that = (UpSaleOrder) o;
        return id == that.id && orderId == that.orderId && fofoId == that.fofoId && Objects.equals(createdTimestamp, that.createdTimestamp);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, orderId, fofoId, createdTimestamp);
    }
}