Checkpoint kinda workls. Ill take a nap and go bacjk to work
This commit is contained in:
@ -1,25 +1,36 @@
|
||||
package com.plannaplan.entities;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OneToOne;
|
||||
|
||||
@Entity
|
||||
public class Commision {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||
private Long id;
|
||||
@ManyToOne
|
||||
@OneToOne
|
||||
@JoinColumn(name = "owner_id")
|
||||
private User commisionOwner;
|
||||
private Timestamp commisionDate;
|
||||
|
||||
public Commision() {
|
||||
@OneToMany(mappedBy = "commision")
|
||||
private List<Assignment> assignments;
|
||||
|
||||
public Commision(User user) {
|
||||
this.commisionDate = new Timestamp(System.currentTimeMillis());
|
||||
this.commisionOwner = user;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public Timestamp getCommisionDate() {
|
||||
|
Reference in New Issue
Block a user