82 lines
1.9 KiB
Java
82 lines
1.9 KiB
Java
package entities;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.UUID;
|
|
|
|
import javax.persistence.Column;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.GeneratedValue;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.Table;
|
|
|
|
import org.hibernate.annotations.GenericGenerator;
|
|
import org.hibernate.annotations.Proxy;
|
|
import org.hibernate.annotations.Type;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|
|
|
@Entity
|
|
@Table(name="\"UserProject\"")
|
|
//@Proxy(lazy = false)
|
|
//@JsonInclude(Include.NON_NULL)
|
|
@JsonIdentityInfo(generator=ObjectIdGenerators.UUIDGenerator.class, property="id")
|
|
public class UserProject implements Serializable{
|
|
|
|
private static final long serialVersionUID = -4467370784003784660L;
|
|
|
|
@Id
|
|
@GeneratedValue
|
|
@GenericGenerator(name = "uuid2", strategy = "uuid2")
|
|
@Column(name = "id", updatable = false, nullable = false, columnDefinition = "BINARY(16)")
|
|
private UUID id;
|
|
|
|
@Type(type="org.hibernate.type.PostgresUUIDType") //DEPWARN dependency to Hibernate and PostgreSQL
|
|
@Column(name = "usr", nullable = false)
|
|
private UUID usr;
|
|
|
|
@Type(type="org.hibernate.type.PostgresUUIDType") //DEPWARN dependency to Hibernate and PostgreSQL
|
|
@Column(name = "project", nullable = false)
|
|
private UUID project;
|
|
|
|
@Column(name = "role")
|
|
private Integer role;
|
|
|
|
public UUID getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(UUID id) {
|
|
this.id = id;
|
|
}
|
|
|
|
|
|
public UUID getUsr() {
|
|
return usr;
|
|
}
|
|
|
|
public void setUsr(UUID usr) {
|
|
this.usr = usr;
|
|
}
|
|
|
|
public UUID getProject() {
|
|
return project;
|
|
}
|
|
|
|
public void setProject(UUID project) {
|
|
this.project = project;
|
|
}
|
|
|
|
public Integer getRole() {
|
|
return role;
|
|
}
|
|
|
|
public void setRole(Integer role) {
|
|
this.role = role;
|
|
}
|
|
|
|
|
|
}
|