PRAPRO2/src/main/java/com/example/prapro2spring/model/ActivityLog.java

70 lines
1.4 KiB
Java

package com.example.prapro2spring.model;
import jakarta.persistence.*;
import java.time.LocalDateTime;
@Entity
@Table(name = "activity_log")
public class ActivityLog {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
@ManyToOne
@JoinColumn(name = "activityId")
private Activity activity;
@ManyToOne
@JoinColumn(name = "humanId")
private Person person;
@Column(name = "start_timestamp")
private java.time.LocalDateTime startTimestamp;
@Column(name = "end_timestamp")
private java.time.LocalDateTime endTimestamp;
// getters and setters
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Activity getActivity() {
return activity;
}
public void setActivity(Activity activity) {
this.activity = activity;
}
public Person getPerson() {
return person;
}
public void setPerson(Person person) {
this.person = person;
}
public LocalDateTime getStartTimestamp() {
return startTimestamp;
}
public void setStartTimestamp(LocalDateTime startTimestamp) {
this.startTimestamp = startTimestamp;
}
public LocalDateTime getEndTimestamp() {
return endTimestamp;
}
public void setEndTimestamp(LocalDateTime endTimestamp) {
this.endTimestamp = endTimestamp;
}
}