Commit 51751cb6 authored by liuchao's avatar liuchao

no message

parent 1d28778c
package com.qiankun.entity;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.ManyToOne;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;
@Entity
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public class Points {
@Id
@GenericGenerator(name = "systemUUID", strategy = "uuid2")
@GeneratedValue(generator = "systemUUID")
private String id;
private String name; //名称
private String type; //积分类别
private Integer point; //积分
@ManyToOne
private User user = new User();
private Date updateTime = new Date();
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Integer getPoint() {
return point;
}
public void setPoint(Integer point) {
this.point = point;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
...@@ -79,6 +79,10 @@ public class User { ...@@ -79,6 +79,10 @@ public class User {
@JsonIgnore @JsonIgnore
private Set<Blood> review = new HashSet<Blood>(); private Set<Blood> review = new HashSet<Blood>();
@OneToMany(fetch = FetchType.LAZY, cascade = { CascadeType.ALL}, orphanRemoval = true, mappedBy = "user")
@JsonIgnore
private Set<Points> points = new HashSet<Points>();
private Boolean isRemove=false;//是否删除用户,默认false private Boolean isRemove=false;//是否删除用户,默认false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment