-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSystemLog.java
More file actions
144 lines (109 loc) · 3.17 KB
/
Copy pathSystemLog.java
File metadata and controls
144 lines (109 loc) · 3.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/**
* Entität Klasse für System Logs
* @author PD
* Code von anderen Teammitgliedern oder Quellen wird durch einzelne Kommentare deklariert
* @version 1.0
*/
package ch.fhnw.timerecordingbackend.model;
import jakarta.persistence.*;
import java.time.LocalDateTime;
@Entity
@Table(name = "system_logs")
public class SystemLog {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(nullable = false)
private String action;
@Column(nullable = false)
private LocalDateTime timestamp;
@Column(length = 1000)
private String details;
@Column(name = "user_id")
private Long userId;
@Column(name = "user_email", length = 100)
private String userEmail;
@Column(name = "ip_address", length = 45)
private String ipAddress;
@Column(name = "target_entity", length = 50)
private String targetEntity;
@Column(name = "target_id")
private Long targetId;
// NEUES FELD für den Status der Anfrage
@Column(name = "processed_status", length = 20) // z.B. "PENDING", "COMPLETED"
private String processedStatus;
public SystemLog() {}
// Getter und Setter für alle Felder, inklusive processedStatus
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getAction() {
return action;
}
public void setAction(String action) {
this.action = action;
}
public LocalDateTime getTimestamp() {
return timestamp;
}
public void setTimestamp(LocalDateTime timestamp) {
this.timestamp = timestamp;
}
public String getDetails() {
return details;
}
public void setDetails(String details) {
this.details = details;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getUserEmail() {
return userEmail;
}
public void setUserEmail(String userEmail) {
this.userEmail = userEmail;
}
public String getIpAddress() {
return ipAddress;
}
public void setIpAddress(String ipAddress) {
this.ipAddress = ipAddress;
}
public String getTargetEntity() {
return targetEntity;
}
public void setTargetEntity(String targetEntity) {
this.targetEntity = targetEntity;
}
public Long getTargetId() {
return targetId;
}
public void setTargetId(Long targetId) {
this.targetId = targetId;
}
public String getProcessedStatus() {
return processedStatus;
}
public void setProcessedStatus(String processedStatus) {
this.processedStatus = processedStatus;
}
@Override
public String toString() {
return "SystemLog{" +
"id=" + id +
", action='" + action + '\'' +
", timestamp=" + timestamp +
", details='" + details + '\'' +
", userId=" + userId +
", userEmail='" + userEmail + '\'' +
", processedStatus='" + processedStatus + '\'' + // Hinzugefügt für Debugging
'}';
}
}