1
0
forked from PGL/Clyde

Adding appointment table

This commit is contained in:
Debucquoy Anthony 2024-04-02 19:50:45 +02:00
parent 82b4e24d03
commit 436ba59af1
Signed by: tonitch
GPG Key ID: A78D6421F083D42E
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,9 @@
package ovh.herisson.Clyde.Tables.Msg;
public enum AppointmentStatus {
WAITING_TEACHER,
WAITING_STUDENT,
CONFIRMED,
REFUSED
}

View File

@ -0,0 +1,30 @@
package ovh.herisson.Clyde.Tables.Msg;
import java.util.Date;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.ManyToOne;
import ovh.herisson.Clyde.Tables.User;
@Entity
public class Appointments {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
@ManyToOne
private User teacher, student;
private Date planned;
@Enumerated(EnumType.STRING)
private AppointmentStatus status;
}