concept for assigmnents

This commit is contained in:
Filip Izydorczyk 2020-09-28 16:07:10 +02:00
parent ec77fa782b
commit 4efedf7f35
2 changed files with 35 additions and 2 deletions

View File

@ -16,8 +16,8 @@ public class Assignment {
@JoinColumn(name = "group_id") @JoinColumn(name = "group_id")
private Groups group; private Groups group;
@ManyToOne @ManyToOne
@JoinColumn(name = "user_id") @JoinColumn(name = "commision_id")
private User user; private Commision commision;
public Assignment() { public Assignment() {
} }

View File

@ -0,0 +1,33 @@
package com.plannaplan.entities;
import java.sql.Timestamp;
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 Commision {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@ManyToOne
@JoinColumn(name = "owner_id")
private User commisionOwner;
private Timestamp commisionDate;
public Commision() {
}
public Timestamp getCommisionDate() {
return commisionDate;
}
public User getCommisionOwner() {
return commisionOwner;
}
}