当前类
public class TbBalanceAcceptance extends ThunderEntity {
@Column
private Long userId;
@Column
private Date acceptanceTime;
@Column
private String testWay;
@Column
private Date nextTestTime;
@Column
private Long expertId;
@Column
private String comment;
@One(field = "userId", key = "id")
private TbUser tbUser;
@One(field = "expertId", key = "id")
private TbExpert tbExpert;
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Date getAcceptanceTime() {
return acceptanceTime;
}
public void setAcceptanceTime(Date acceptanceTime) {
this.acceptanceTime = acceptanceTime;
}
public Date getNextTestTime() {
return nextTestTime;
}
public void setNextTestTime(Date nextTestTime) {
this.nextTestTime = nextTestTime;
}
public Long getExpertId() {
return expertId;
}
public void setExpertId(Long expertId) {
this.expertId = expertId;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public TbUser getTbUser() {
return tbUser;
}
public void setTbUser(TbUser tbUser) {
this.tbUser = tbUser;
}
public TbExpert getTbExpert() {
return tbExpert;
}
public void setTbExpert(TbExpert tbExpert) {
this.tbExpert = tbExpert;
}
public String getTestWay() {
return testWay;
}
public void setTestWay(String testWay) {
this.testWay = testWay;
}
}
超类
public class ThunderEntity extends DataBaseEntity implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
static Security security;
@Id
Long id;
@Column
@Comment("操作人")
@Prev(els = @EL("$me.uid()"))
@ColDefine(type = ColType.AUTO)
private Long opBy;
@Column
@Comment("操作时间")
@Prev(els = @EL("$me.now()"))
@ColDefine(type = ColType.TIMESTAMP)
private Date opAt;
public Date now() {
return new Date();
}
public Long uid() {
try {
return security.uid();
} catch (Exception e) {
}
return null;
}
public Long getId() {
return id;
}
public Integer getIntId(){
return Integer.parseInt(String.valueOf(id));
}
public void setId(Long id) {
this.id = id;
}
public void setIntId(Integer id){
this.id = Long.parseLong(String.valueOf(id));
}
public void setOpBy(Long opBy) {
this.opBy = opBy;
}
public Date getOpAt() {
return opAt;
}
public void setOpAt() {
this.opAt = new Date();
}
public void setOpAt(Date opAt) {
this.opAt = opAt;
}
public String uuid() {
return R.UU32().toLowerCase();
}
public static void setSecurity(Security security){
ThunderEntity.security = security;
}
}