import com.plannaplan.entities.Assignment;

This commit is contained in:
Filip Izydorczyk 2020-07-25 11:03:03 +02:00
parent 44b6b794e0
commit 9a53025a4b
3 changed files with 53 additions and 0 deletions

View File

@ -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;
}
}

View File

@ -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> {
}

View File

@ -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;
}