package com.jspxcms.core.domain; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import javax.persistence.TableGenerator; import javax.persistence.Temporal; import javax.persistence.TemporalType; /** * WorkflowLog * * @author liufang * */ @Entity @Table(name = "cms_workflow_log") public class WorkflowLog implements java.io.Serializable { private static final long serialVersionUID = 1L; public void applyDefaultValue() { } private Integer id; private WorkflowProcess process; private User user; private Site site; private String from; private String to; private Date creationDate; private String opinion; private Integer type; @Id @Column(name = "f_workflowlog_id", unique = true, nullable = false) @TableGenerator(name = "tg_cms_workflow_log", pkColumnValue = "cms_workflow_log", table = "t_id_table", pkColumnName = "f_table", valueColumnName = "f_id_value", initialValue = 1, allocationSize = 1) @GeneratedValue(strategy = GenerationType.TABLE, generator = "tg_cms_workflow_log") public Integer getId() { return this.id; } public void setId(Integer id) { this.id = id; } @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "f_workflowprocess_id", nullable = false) public WorkflowProcess getProcess() { return this.process; } public void setProcess(WorkflowProcess process) { this.process = process; } @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "f_user_id", nullable = false) public User getUser() { return user; } public void setUser(User user) { this.user = user; } @Column(name = "f_from", nullable = false, length = 100) public String getFrom() { return this.from; } @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "f_site_id", nullable = false) public Site getSite() { return this.site; } public void setSite(Site site) { this.site = site; } public void setFrom(String from) { this.from = from; } @Column(name = "f_to", nullable = false, length = 100) public String getTo() { return this.to; } public void setTo(String to) { this.to = to; } @Temporal(TemporalType.TIMESTAMP) @Column(name = "f_creation_date", nullable = false, length = 19) public Date getCreationDate() { return this.creationDate; } public void setCreationDate(Date creationDate) { this.creationDate = creationDate; } @Column(name = "f_opinion") public String getOpinion() { return this.opinion; } public void setOpinion(String opinion) { this.opinion = opinion; } @Column(name = "f_type", nullable = false) public Integer getType() { return this.type; } public void setType(Integer type) { this.type = type; } }