108 lines
2.1 KiB
Java
108 lines
2.1 KiB
Java
package cn.palmte.work.model;
|
|
|
|
import org.hibernate.annotations.GenericGenerator;
|
|
|
|
import java.util.Date;
|
|
|
|
import javax.persistence.Column;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.GeneratedValue;
|
|
import javax.persistence.GenerationType;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.Table;
|
|
import javax.persistence.Temporal;
|
|
import javax.persistence.TemporalType;
|
|
import javax.persistence.Transient;
|
|
|
|
/**
|
|
* 部门
|
|
*/
|
|
@Entity
|
|
@Table(name = "dept")
|
|
public class Dept {
|
|
public static final int FAILED = 1;
|
|
public static final int SUCCESS = 0;
|
|
/**
|
|
* id
|
|
*/
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
@GenericGenerator(name = "persistenceGenerator", strategy = "increment")
|
|
private Integer id;
|
|
|
|
private String name;
|
|
|
|
private int enabled;
|
|
|
|
@Column(name = "created_by")
|
|
private String createdBy;
|
|
|
|
/**
|
|
* 创建时间
|
|
*/
|
|
@Column(name = "created_time")
|
|
@Temporal(TemporalType.TIMESTAMP)
|
|
private Date createdTime;
|
|
|
|
@Transient
|
|
private int tempId;
|
|
|
|
@Transient
|
|
private String status;
|
|
|
|
public Integer getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Integer id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public int getEnabled() {
|
|
return enabled;
|
|
}
|
|
|
|
public void setEnabled(int enabled) {
|
|
this.enabled = enabled;
|
|
}
|
|
|
|
public String getCreatedBy() {
|
|
return createdBy;
|
|
}
|
|
|
|
public void setCreatedBy(String createdBy) {
|
|
this.createdBy = createdBy;
|
|
}
|
|
|
|
public Date getCreatedTime() {
|
|
return createdTime;
|
|
}
|
|
|
|
public void setCreatedTime(Date createdTime) {
|
|
this.createdTime = createdTime;
|
|
}
|
|
|
|
public int getTempId() {
|
|
return tempId;
|
|
}
|
|
|
|
public void setTempId(int tempId) {
|
|
this.tempId = tempId;
|
|
}
|
|
|
|
public String getStatus() {
|
|
return status;
|
|
}
|
|
|
|
public void setStatus(String status) {
|
|
this.status = status;
|
|
}
|
|
} |