Subversion Repositories SmartDukaan

Rev

Blame | Last modification | View Log | RSS feed

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

import com.spice.profitmandi.dao.enumuration.transaction.UpSaleCallStatus;

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

/**
 * @author ranu
 */
@Entity
@Table(name = "fofo.upsell_call_details")
public class UpsellCallDetail implements Serializable {


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

    @Column(name = "upsale_call_id")
    private String upSaleCallId;

    @Column(name = "disposition")
    @Enumerated(EnumType.STRING)
    private UpSaleCallStatus disposition;

    @Column(name = "remark")
    private String remark;

    @Column(name = "agent_id")
    private String agentId;

    @Column(name = "dialler_session_id")
    private String diallerSessionId;

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

    public int getId() {
        return id;
    }

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

    public String getUpSaleCallId() {
        return upSaleCallId;
    }

    public void setUpSaleCallId(String upSaleCallId) {
        this.upSaleCallId = upSaleCallId;
    }

    public UpSaleCallStatus getDisposition() {
        return disposition;
    }

    public void setDisposition(UpSaleCallStatus disposition) {
        this.disposition = disposition;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getAgentId() {
        return agentId;
    }

    public void setAgentId(String agentId) {
        this.agentId = agentId;
    }

    public String getDiallerSessionId() {
        return diallerSessionId;
    }

    public void setDiallerSessionId(String diallerSessionId) {
        this.diallerSessionId = diallerSessionId;
    }

    public LocalDateTime getCreatedTimestamp() {
        return createdTimestamp;
    }

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

    @Override
    public String toString() {
        return "UpsellCallDetail{" +
                "id=" + id +
                ", upSaleCallId='" + upSaleCallId + '\'' +
                ", disposition=" + disposition +
                ", remark='" + remark + '\'' +
                ", agentId='" + agentId + '\'' +
                ", diallerSessionId='" + diallerSessionId + '\'' +
                ", createdTimestamp=" + createdTimestamp +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UpsellCallDetail that = (UpsellCallDetail) o;
        return id == that.id && Objects.equals(upSaleCallId, that.upSaleCallId) && disposition == that.disposition && Objects.equals(remark, that.remark) && Objects.equals(agentId, that.agentId) && Objects.equals(diallerSessionId, that.diallerSessionId) && Objects.equals(createdTimestamp, that.createdTimestamp);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, upSaleCallId, disposition, remark, agentId, diallerSessionId, createdTimestamp);
    }
}