Added Reward for Cache

This commit is contained in:
Maximilian Leopold 2019-03-23 11:20:47 +01:00
parent af2c4e49ea
commit 38bc2d4701
3 changed files with 13 additions and 2 deletions

View File

@ -17,6 +17,7 @@ repositories {
} }
dependencies { dependencies {
//Java Spring
implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-web'
runtimeOnly 'org.springframework.boot:spring-boot-devtools' runtimeOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'mysql:mysql-connector-java' runtimeOnly 'mysql:mysql-connector-java'

View File

@ -1,7 +1,6 @@
package hhn.labsw.bugageocaching.controller; package hhn.labsw.bugageocaching.controller;
import com.google.gson.Gson; import com.google.gson.Gson;
import hhn.labsw.bugageocaching.entities.Cache;
import hhn.labsw.bugageocaching.repositories.CacheRepository; import hhn.labsw.bugageocaching.repositories.CacheRepository;
import hhn.labsw.bugageocaching.repositories.RewardRepository; import hhn.labsw.bugageocaching.repositories.RewardRepository;
import hhn.labsw.bugageocaching.repositories.StationRepository; import hhn.labsw.bugageocaching.repositories.StationRepository;

View File

@ -20,6 +20,9 @@ public class Cache {
@OneToMany @OneToMany
private List<Station> stationen = new ArrayList<>(); private List<Station> stationen = new ArrayList<>();
@ManyToOne
private Reward reward;
public Cache() { public Cache() {
} }
@ -59,7 +62,15 @@ public class Cache {
return stationen; return stationen;
} }
public void setStationen(ArrayList<Station> stationen) { public void setStationen(List<Station> stationen) {
this.stationen = stationen; this.stationen = stationen;
} }
public Reward getReward() {
return reward;
}
public void setReward(Reward reward) {
this.reward = reward;
}
} }