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;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import thinkTogether.groupManagement.model.Group;
import thinkTogether.groupManagement.model.Learninggroup;
import thinkTogether.groupManagement.repo.IGroupRepository;
import java.util.List;
......@@ -25,7 +25,7 @@ public class GroupManagementController {
}
@GetMapping("/groups")
public List<Group> findAll() {
public List<Learninggroup> findAll() {
return groupRepository.findAll();
}
......
......@@ -4,21 +4,21 @@ import javax.persistence.*;
import java.sql.Date;
@Entity
public class Group {
public class Learninggroup {
@Id
private Long id;
private String status;
private Date erstelldatum;
private Date date;
private int modulid;
protected Group() {
protected Learninggroup() {
}
public Group(String status, Date erstelldatum, int modulid) {
this.erstelldatum = erstelldatum;
public Learninggroup(String status, Date erstelldatum, int modulid) {
this.date = erstelldatum;
this.modulid = modulid;
this.status = status;
......@@ -33,11 +33,11 @@ public class Group {
}
public Date getDatum() {
return erstelldatum;
return date;
}
public void setDatum(Date datum) {
this.erstelldatum = datum;
this.date = datum;
}
public Integer getModul() {
......
......@@ -2,13 +2,13 @@ package thinkTogether.groupManagement.repo;
import org.springframework.data.repository.CrudRepository;
import thinkTogether.groupManagement.model.Group;
import thinkTogether.groupManagement.model.Learninggroup;
import java.util.List;
//Erstellt Zwischenspeicher für die Datenentitäten? "DAO"???
public interface IGroupRepository extends CrudRepository<Group, Long> {
public List<Group> findAll();
public interface IGroupRepository extends CrudRepository<Learninggroup, Long> {
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