import com.plannaplan.entities.Assignment;
This commit is contained in:
parent
44b6b794e0
commit
9a53025a4b
@ -0,0 +1,30 @@
|
||||
package com.plannaplan.entities;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
|
||||
@Entity
|
||||
public class Unavailability {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||
private Long id;
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private User lecturer;
|
||||
private int time;
|
||||
|
||||
public Unavailability() {
|
||||
}
|
||||
|
||||
public int getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(int time) {
|
||||
this.time = time;
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.plannaplan.repositories;
|
||||
|
||||
import com.plannaplan.entities.Unavailability;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface UnavailabilityRepository extends JpaRepository<Unavailability, Long> {
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.plannaplan.services;
|
||||
|
||||
import com.plannaplan.repositories.UnavailabilityRepository;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class UnavailabilityService {
|
||||
@Autowired
|
||||
private UnavailabilityRepository repos;
|
||||
}
|
Loading…
Reference in New Issue
Block a user