1
0
forked from PGL/Clyde

- Ajoute un champ year dans UserCurriculum pour différencier les anciers cursus de l'actuel pour l'étudiant

- Ajoute la table ExemptionsRequest
- Ajoute la table ScholarshipRequest
- Ajoute la table UninscriptionRequest
This commit is contained in:
LeoMoulin 2024-03-23 14:08:03 +01:00
parent 3d6941ab93
commit ad0e7b3e35
6 changed files with 190 additions and 2 deletions

View File

@ -81,7 +81,7 @@ public class InscriptionService {
);
userRepo.save(userFromRequest);
userCurriculumRepo.save(new UserCurriculum(userFromRequest, curriculumRepo.findById(inscrRequest.getCurriculumId())));
userCurriculumRepo.save(new UserCurriculum(userFromRequest, curriculumRepo.findById(inscrRequest.getCurriculumId()),0));
}
inscrRequest.setState(requestState);
save(inscrRequest);

View File

@ -0,0 +1,66 @@
package ovh.herisson.Clyde.Tables;
import jakarta.persistence.*;
@Entity
public class ExemptionsRequest {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
@ManyToOne
@JoinColumn(name = "Users")
private User user;
@ManyToOne
@JoinColumn(name = "Course")
private Course course;
private String justifDocument;
private RequestState state;
public ExemptionsRequest(User user, Course course, String justifDocument, RequestState state){
this.user = user;
this.course = course;
this.justifDocument = justifDocument;
this.state = state;
}
public ExemptionsRequest(){}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public Course getCourse() {
return course;
}
public void setCourse(Course course) {
this.course = course;
}
public String getJustifDocument() {
return justifDocument;
}
public void setJustifDocument(String justifDocument) {
this.justifDocument = justifDocument;
}
public RequestState getState() {
return state;
}
public void setState(RequestState state) {
this.state = state;
}
}

View File

@ -0,0 +1,59 @@
package ovh.herisson.Clyde.Tables;
import jakarta.persistence.*;
@Entity
public class ScholarshipRequest {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
@ManyToOne
@JoinColumn(name = "Users")
private User user;
private RequestState state;
private String requestForm;
private int amount;
public ScholarshipRequest(User user, RequestState state, String requestForm, int amount){
this.user = user;
this.state = state;
this.requestForm = requestForm;
this.amount = amount;
}
public ScholarshipRequest(){}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public RequestState getState() {
return state;
}
public void setState(RequestState state) {
this.state = state;
}
public String getRequestForm() {
return requestForm;
}
public void setRequestForm(String requestForm) {
this.requestForm = requestForm;
}
public int getAmount() {
return amount;
}
public void setAmount(int amount) {
this.amount = amount;
}
}

View File

@ -0,0 +1,28 @@
package ovh.herisson.Clyde.Tables;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
@Entity
public class UninscriptionRequest {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
private RequestState state;
public UninscriptionRequest(RequestState state){
this.state = state;
}
public UninscriptionRequest(){}
public RequestState getState() {
return state;
}
public void setState(RequestState state) {
this.state = state;
}
}

View File

@ -21,9 +21,12 @@ public class UserCurriculum {
@OnDelete(action = OnDeleteAction.CASCADE)
private Curriculum curriculum;
public UserCurriculum(User user, Curriculum curriculum){
private int year;
public UserCurriculum(User user, Curriculum curriculum, int year){
this.user = user;
this.curriculum = curriculum;
this.year = year;
}
public UserCurriculum() {}
@ -47,4 +50,12 @@ public class UserCurriculum {
public void setCurriculum(Curriculum curriculum) {
this.curriculum = curriculum;
}
public int getYear() {
return year;
}
public void setYear(int year) {
this.year = year;
}
}

View File

@ -0,0 +1,24 @@
<script setup>
</script>
<template>
<div class="aboutbox">
<h1 class="test">Coucou</h1>
</div>
</template>
<style scoped>
.aboutbox {
background-color: rgb(24,24,24);
width: 400px;
display:flex;
justify-content: center;
padding: 40px;
border-radius: 20px;
box-shadow:0 5px 25px #000000;
}
.test{
color: red;
}
</style>