Added last service
This commit is contained in:
parent
0843fbccde
commit
71cd5ad33b
@ -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() {
|
||||
}
|
||||
|
||||
}
|
@ -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> {
|
||||
|
||||
}
|
@ -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
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user