Subversion Repositories SmartDukaan

Rev

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

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

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

@Entity
@Table(name = "cs.agent_recordings")
public class AgentRecording {

    @Id
    @Column(name = "id", unique = true, updatable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;

    @Column
    private int agentId;


    @Column(name = "recording")
    private String recordingUrl;

    @Column
    private String mobileNumber;

    @Column
    private int durationInSec;

    @Column
    LocalDateTime talkEndTime;

    public int getId() {
        return id;
    }

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

    public int getAgentId() {
        return agentId;
    }

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

    public String getRecordingUrl() {
        return recordingUrl;
    }

    public void setRecordingUrl(String recordingUrl) {
        this.recordingUrl = recordingUrl;
    }

    public String getMobileNumber() {
        return mobileNumber;
    }

    public void setMobileNumber(String mobileNumber) {
        this.mobileNumber = mobileNumber;
    }

    public int getDurationInSec() {
        return durationInSec;
    }

    public void setDurationInSec(int durationInSec) {
        this.durationInSec = durationInSec;
    }

    public LocalDateTime getTalkEndTime() {
        return talkEndTime;
    }

    public void setTalkEndTime(LocalDateTime talkEndTime) {
        this.talkEndTime = talkEndTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AgentRecording that = (AgentRecording) o;
        return id == that.id && agentId == that.agentId && durationInSec == that.durationInSec && Objects.equals(recordingUrl, that.recordingUrl) && Objects.equals(mobileNumber, that.mobileNumber) && Objects.equals(talkEndTime, that.talkEndTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, agentId, recordingUrl, mobileNumber, durationInSec, talkEndTime);
    }

    @Override
    public String toString() {
        return "AgentRecording{" +
                "id=" + id +
                ", agentId=" + agentId +
                ", recordingUrl='" + recordingUrl + '\'' +
                ", mobileNumber='" + mobileNumber + '\'' +
                ", durationInSec=" + durationInSec +
                ", talkEndTime=" + talkEndTime +
                '}';
    }
}