Adding appointment table
This commit is contained in:
parent
82b4e24d03
commit
436ba59af1
@ -0,0 +1,9 @@
|
|||||||
|
package ovh.herisson.Clyde.Tables.Msg;
|
||||||
|
|
||||||
|
public enum AppointmentStatus {
|
||||||
|
WAITING_TEACHER,
|
||||||
|
WAITING_STUDENT,
|
||||||
|
CONFIRMED,
|
||||||
|
REFUSED
|
||||||
|
}
|
||||||
|
|
@ -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;
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user