Authorization.java
/**
* TFG 75.678 - TFG Desarrollo web 2020 e-Learning for Schools
* Copyright (C) 2020 Eduardo Rodriguez Carro
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.uoc.tfg.sel.repository.model;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.springframework.lang.NonNull;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
/**
* Modelo de Autorizaciones.
*
* @author Eduardo Rodriguez carro
*/
@JsonInclude(value = Include.NON_NULL)
@Entity
@Table(name = "authorization")
public class Authorization {
/** The id. */
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name = "id")
private Integer id;
/** The teacher tutor. */
@ManyToOne
@NonNull
@JoinColumn(name="teachertutor_id")
private User teacherTutor;
/** The student. */
@ManyToOne
@NonNull
@JoinColumn(name="student_id")
private User student;
/** The status. */
@NonNull
private Integer status;
/** The porpouse. */
@NonNull
private String porpouse;
/** The date. */
@NonNull
private Date date;
/** The notes. */
private String notes;
/**
* Gets the id.
*
* @return the id
*/
public Integer getId() {
return id;
}
/**
* Sets the id.
*
* @param id the new id
*/
public void setId(Integer id) {
this.id = id;
}
/**
* Gets the teacher tutor.
*
* @return the teacher tutor
*/
public User getTeacherTutor() {
return teacherTutor;
}
/**
* Sets the teacher tutor.
*
* @param teacherTutor the new teacher tutor
*/
public void setTeacherTutor(User teacherTutor) {
this.teacherTutor = teacherTutor;
}
/**
* Gets the student.
*
* @return the student
*/
public User getStudent() {
return student;
}
/**
* Sets the student.
*
* @param student the new student
*/
public void setStudent(User student) {
this.student = student;
}
/**
* Gets the status.
*
* @return the status
*/
public Integer getStatus() {
return status;
}
/**
* Sets the status.
*
* @param status the new status
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* Gets the porpouse.
*
* @return the porpouse
*/
public String getPorpouse() {
return porpouse;
}
/**
* Sets the porpouse.
*
* @param porpouse the new porpouse
*/
public void setPorpouse(String porpouse) {
this.porpouse = porpouse;
}
/**
* Gets the date.
*
* @return the date
*/
public Date getDate() {
return date;
}
/**
* Sets the date.
*
* @param date the new date
*/
public void setDate(Date date) {
this.date = date;
}
/**
* Gets the notes.
*
* @return the notes
*/
public String getNotes() {
return notes;
}
/**
* Sets the notes.
*
* @param notes the new notes
*/
public void setNotes(String notes) {
this.notes = notes;
}
}