stationen haben nun eine reihenfolge innerhalb eines caches

This commit is contained in:
Michael 2019-03-25 21:47:46 +01:00
parent aa6d2c31fa
commit 2db55ac35d
2 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,53 @@
package hhn.labsw.bugageocaching.entities;
import javax.persistence.*;
@Entity
@Table
public class StationReihenfolge {
@Id
@GeneratedValue
private int id;
@OneToOne
private Cache cache;
@OneToOne
private Station station;
@OneToOne
private Station nachfolgeStation;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public Cache getCache() {
return cache;
}
public void setCache(Cache cache) {
this.cache = cache;
}
public Station getStation() {
return station;
}
public void setStation(Station station) {
this.station = station;
}
public Station getNachfolgeStation() {
return nachfolgeStation;
}
public void setNachfolgeStation(Station nachfolgeStation) {
this.nachfolgeStation = nachfolgeStation;
}
}

View File

@ -0,0 +1,7 @@
package hhn.labsw.bugageocaching.repositories;
import hhn.labsw.bugageocaching.entities.StationReihenfolge;
import org.springframework.data.repository.CrudRepository;
public interface StationReihenfolgeRepository extends CrudRepository<StationReihenfolge, Integer> {
}