Added last service

This commit is contained in:
Filip Izydorczyk 2020-07-27 16:00:11 +02:00
parent 0843fbccde
commit 71cd5ad33b
3 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,28 @@
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 Transfer {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@ManyToOne
@JoinColumn(name = "owner_id")
private User ownerUser;
@ManyToOne
@JoinColumn(name = "group_id")
private Groups ownerGroup;
@ManyToOne
@JoinColumn(name = "target_id")
private Groups targetGroup;
public Transfer() {
}
}

View File

@ -0,0 +1,11 @@
package com.plannaplan.repositories;
import com.plannaplan.entities.Transfer;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface TransferRepository extends JpaRepository<Transfer, Long> {
}

View File

@ -0,0 +1,19 @@
package com.plannaplan.services;
import com.plannaplan.interfaces.EventCreator;
import com.plannaplan.repositories.TransferRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class TransferService implements EventCreator {
@Autowired
private TransferRepository repo;
@Override
public void update() {
// TODO Auto-generated method stub
}
}