Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
37651 vikas 1
package com.spice.profitmandi.dao.entity.user;
2
 
3
import javax.persistence.Column;
4
import javax.persistence.Entity;
5
import javax.persistence.GeneratedValue;
6
import javax.persistence.GenerationType;
7
import javax.persistence.Id;
8
import javax.persistence.Table;
9
import java.time.LocalDateTime;
10
 
11
/**
12
 * Audit log of call-recording opens (SOP §15/§17). The LMS dashboard states that recordings are
13
 * "gated by role + reporting hierarchy; every open is logged" — this table is the log half of that
14
 * claim, and {@code /lms/recording/{leadCallId}} is the gate half.
15
 *
16
 * <p>Denied attempts are recorded too ({@code granted = false} with a {@code denied_reason}): an
17
 * agent repeatedly probing for recordings outside their scope is exactly what an audit review wants
18
 * to see, and a log that only kept successes would hide it.
19
 */
20
@Entity
21
@Table(name = "user.lead_recording_access")
22
public class LeadRecordingAccess {
23
 
24
    @Id
25
    @Column(name = "id", unique = true, updatable = false)
26
    @GeneratedValue(strategy = GenerationType.IDENTITY)
27
    private int id;
28
 
29
    @Column(name = "lead_call_id")
30
    private int leadCallId;
31
 
32
    @Column(name = "lead_id")
33
    private int leadId;
34
 
35
    /** Who tried to open it. */
36
    @Column(name = "auth_id")
37
    private int authId;
38
 
39
    /** Which matrix row let them in: OWN | REPORTS | STATE | ALL — null when denied. */
40
    @Column(name = "access_basis")
41
    private String accessBasis;
42
 
43
    @Column(name = "granted")
44
    private boolean granted;
45
 
46
    @Column(name = "denied_reason")
47
    private String deniedReason;
48
 
49
    @Column(name = "ip_address")
50
    private String ipAddress;
51
 
52
    @Column(name = "created_timestamp")
53
    private LocalDateTime createdTimestamp;
54
 
55
    public int getId() {
56
        return id;
57
    }
58
 
59
    public void setId(int id) {
60
        this.id = id;
61
    }
62
 
63
    public int getLeadCallId() {
64
        return leadCallId;
65
    }
66
 
67
    public void setLeadCallId(int leadCallId) {
68
        this.leadCallId = leadCallId;
69
    }
70
 
71
    public int getLeadId() {
72
        return leadId;
73
    }
74
 
75
    public void setLeadId(int leadId) {
76
        this.leadId = leadId;
77
    }
78
 
79
    public int getAuthId() {
80
        return authId;
81
    }
82
 
83
    public void setAuthId(int authId) {
84
        this.authId = authId;
85
    }
86
 
87
    public String getAccessBasis() {
88
        return accessBasis;
89
    }
90
 
91
    public void setAccessBasis(String accessBasis) {
92
        this.accessBasis = accessBasis;
93
    }
94
 
95
    public boolean isGranted() {
96
        return granted;
97
    }
98
 
99
    public void setGranted(boolean granted) {
100
        this.granted = granted;
101
    }
102
 
103
    public String getDeniedReason() {
104
        return deniedReason;
105
    }
106
 
107
    public void setDeniedReason(String deniedReason) {
108
        this.deniedReason = deniedReason;
109
    }
110
 
111
    public String getIpAddress() {
112
        return ipAddress;
113
    }
114
 
115
    public void setIpAddress(String ipAddress) {
116
        this.ipAddress = ipAddress;
117
    }
118
 
119
    public LocalDateTime getCreatedTimestamp() {
120
        return createdTimestamp;
121
    }
122
 
123
    public void setCreatedTimestamp(LocalDateTime createdTimestamp) {
124
        this.createdTimestamp = createdTimestamp;
125
    }
126
}