Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
35679 ranu 1
package com.spice.profitmandi.dao.entity.cs;
2
 
3
import javax.persistence.*;
4
import java.time.LocalDate;
5
import java.time.LocalTime;
6
import java.util.Objects;
7
 
8
@Entity
9
@Table(name = "cs.agent_call_log", uniqueConstraints = {@UniqueConstraint(columnNames = "call_uuid")})
35686 ranu 10
 
11
@NamedQueries({
12
        @NamedQuery(
13
                name = "AgentCallLog.findLatest",
14
                query = "SELECT a FROM AgentCallLog a " +
15
                        "WHERE a.customerNumber = :customerNumber " +
16
                        "AND a.agentNumber = :agentNumber " +
17
                        "AND a.callDate = :callDate " +
18
                        "AND a.callUuid IS NULL " +
19
                        "ORDER BY a.id DESC"
20
        )
21
})
35679 ranu 22
public class AgentCallLog {
23
 
24
    @Id
25
    @GeneratedValue(strategy = GenerationType.IDENTITY)
26
    private Long id;
27
 
28
    @Column(name = "call_date")
29
    private LocalDate callDate;
30
 
31
    @Column(name = "call_time")
32
    private LocalTime callTime;
33
 
34
    @Column(name = "call_status")
35
    private String callStatus;
36
 
37
    @Column(name = "call_duration")
38
    private String callDuration;
39
 
40
    @Column(name = "caller_id")
41
    private String callerId;
42
 
43
    @Column(name = "customer_number")
44
    private String customerNumber;
45
 
46
    @Column(name = "agent_number")
47
    private String agentNumber;
48
 
49
    @Column(name = "call_uuid", unique = true)
50
    private String callUuid;
51
 
52
    @Column(name = "recording_url")
53
    private String recordingUrl;
54
 
55
    @Column(name = "call_transfer_duration")
56
    private String callTransferDuration;
57
 
58
    @Column(name = "customer_status")
59
    private String customerStatus;
60
 
61
    @Column(name = "sip_id")
62
    private String sipId;
63
 
64
    public Long getId() {
65
        return id;
66
    }
67
 
68
    public void setId(Long id) {
69
        this.id = id;
70
    }
71
 
72
    public LocalDate getCallDate() {
73
        return callDate;
74
    }
75
 
76
    public void setCallDate(LocalDate callDate) {
77
        this.callDate = callDate;
78
    }
79
 
80
    public LocalTime getCallTime() {
81
        return callTime;
82
    }
83
 
84
    public void setCallTime(LocalTime callTime) {
85
        this.callTime = callTime;
86
    }
87
 
88
    public String getCallStatus() {
89
        return callStatus;
90
    }
91
 
92
    public void setCallStatus(String callStatus) {
93
        this.callStatus = callStatus;
94
    }
95
 
96
    public String getCallDuration() {
97
        return callDuration;
98
    }
99
 
100
    public void setCallDuration(String callDuration) {
101
        this.callDuration = callDuration;
102
    }
103
 
104
    public String getCallerId() {
105
        return callerId;
106
    }
107
 
108
    public void setCallerId(String callerId) {
109
        this.callerId = callerId;
110
    }
111
 
112
    public String getCustomerNumber() {
113
        return customerNumber;
114
    }
115
 
116
    public void setCustomerNumber(String customerNumber) {
117
        this.customerNumber = customerNumber;
118
    }
119
 
120
    public String getAgentNumber() {
121
        return agentNumber;
122
    }
123
 
124
    public void setAgentNumber(String agentNumber) {
125
        this.agentNumber = agentNumber;
126
    }
127
 
128
    public String getCallUuid() {
129
        return callUuid;
130
    }
131
 
132
    public void setCallUuid(String callUuid) {
133
        this.callUuid = callUuid;
134
    }
135
 
136
    public String getRecordingUrl() {
137
        return recordingUrl;
138
    }
139
 
140
    public void setRecordingUrl(String recordingUrl) {
141
        this.recordingUrl = recordingUrl;
142
    }
143
 
144
    public String getCallTransferDuration() {
145
        return callTransferDuration;
146
    }
147
 
148
    public void setCallTransferDuration(String callTransferDuration) {
149
        this.callTransferDuration = callTransferDuration;
150
    }
151
 
152
    public String getCustomerStatus() {
153
        return customerStatus;
154
    }
155
 
156
    public void setCustomerStatus(String customerStatus) {
157
        this.customerStatus = customerStatus;
158
    }
159
 
160
    public String getSipId() {
161
        return sipId;
162
    }
163
 
164
    public void setSipId(String sipId) {
165
        this.sipId = sipId;
166
    }
167
 
168
    @Override
169
    public String toString() {
170
        return "AgentCallLog{" +
171
                "id=" + id +
172
                ", callDate=" + callDate +
173
                ", callTime=" + callTime +
174
                ", callStatus='" + callStatus + '\'' +
175
                ", callDuration='" + callDuration + '\'' +
176
                ", callerId='" + callerId + '\'' +
177
                ", customerNumber='" + customerNumber + '\'' +
178
                ", agentNumber='" + agentNumber + '\'' +
179
                ", callUuid='" + callUuid + '\'' +
180
                ", recordingUrl='" + recordingUrl + '\'' +
181
                ", callTransferDuration='" + callTransferDuration + '\'' +
182
                ", customerStatus='" + customerStatus + '\'' +
183
                ", sipId='" + sipId + '\'' +
184
                '}';
185
    }
186
 
187
    @Override
188
    public boolean equals(Object o) {
189
        if (this == o) return true;
190
        if (o == null || getClass() != o.getClass()) return false;
191
        AgentCallLog that = (AgentCallLog) o;
192
        return Objects.equals(id, that.id) &&
193
                Objects.equals(callDate, that.callDate) &&
194
                Objects.equals(callTime, that.callTime) &&
195
                Objects.equals(callStatus, that.callStatus) &&
196
                Objects.equals(callDuration, that.callDuration) &&
197
                Objects.equals(callerId, that.callerId) &&
198
                Objects.equals(customerNumber, that.customerNumber) &&
199
                Objects.equals(agentNumber, that.agentNumber) &&
200
                Objects.equals(callUuid, that.callUuid) &&
201
                Objects.equals(recordingUrl, that.recordingUrl) &&
202
                Objects.equals(callTransferDuration, that.callTransferDuration) &&
203
                Objects.equals(customerStatus, that.customerStatus) &&
204
                Objects.equals(sipId, that.sipId);
205
    }
206
 
207
    @Override
208
    public int hashCode() {
209
        return Objects.hash(id, callDate, callTime, callStatus, callDuration, callerId, customerNumber,
210
                agentNumber, callUuid, recordingUrl, callTransferDuration, customerStatus, sipId);
211
    }
212
}