Skip to content
Snippets Groups Projects
Commit 8536edde authored by Annika Geßmann's avatar Annika Geßmann
Browse files

Schema groupmanagement cat yes, learninggroup yes

parent e7f219dc
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ package thinkTogether.groupManagement.controller; ...@@ -2,7 +2,7 @@ package thinkTogether.groupManagement.controller;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import thinkTogether.groupManagement.model.Group; import thinkTogether.groupManagement.model.Learninggroup;
import thinkTogether.groupManagement.repo.IGroupRepository; import thinkTogether.groupManagement.repo.IGroupRepository;
import java.util.List; import java.util.List;
...@@ -25,7 +25,7 @@ public class GroupManagementController { ...@@ -25,7 +25,7 @@ public class GroupManagementController {
} }
@GetMapping("/groups") @GetMapping("/groups")
public List<Group> findAll() { public List<Learninggroup> findAll() {
return groupRepository.findAll(); return groupRepository.findAll();
} }
......
...@@ -4,21 +4,21 @@ import javax.persistence.*; ...@@ -4,21 +4,21 @@ import javax.persistence.*;
import java.sql.Date; import java.sql.Date;
@Entity @Entity
public class Group { public class Learninggroup {
@Id @Id
private Long id; private Long id;
private String status; private String status;
private Date erstelldatum; private Date date;
private int modulid; private int modulid;
protected Group() { protected Learninggroup() {
} }
public Group(String status, Date erstelldatum, int modulid) { public Learninggroup(String status, Date erstelldatum, int modulid) {
this.erstelldatum = erstelldatum; this.date = erstelldatum;
this.modulid = modulid; this.modulid = modulid;
this.status = status; this.status = status;
...@@ -33,11 +33,11 @@ public class Group { ...@@ -33,11 +33,11 @@ public class Group {
} }
public Date getDatum() { public Date getDatum() {
return erstelldatum; return date;
} }
public void setDatum(Date datum) { public void setDatum(Date datum) {
this.erstelldatum = datum; this.date = datum;
} }
public Integer getModul() { public Integer getModul() {
......
...@@ -2,13 +2,13 @@ package thinkTogether.groupManagement.repo; ...@@ -2,13 +2,13 @@ package thinkTogether.groupManagement.repo;
import org.springframework.data.repository.CrudRepository; import org.springframework.data.repository.CrudRepository;
import thinkTogether.groupManagement.model.Group; import thinkTogether.groupManagement.model.Learninggroup;
import java.util.List; import java.util.List;
//Erstellt Zwischenspeicher für die Datenentitäten? "DAO"??? //Erstellt Zwischenspeicher für die Datenentitäten? "DAO"???
public interface IGroupRepository extends CrudRepository<Group, Long> { public interface IGroupRepository extends CrudRepository<Learninggroup, Long> {
public List<Group> findAll(); public List<Learninggroup> findAll();
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment