package com.atguigu.sssp.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.springframework.format.annotation.DateTimeFormat;

@Table(name="SSSP_EMPLOYEES")
@Entity
public class Employee {
	
	private Integer id;
	private String lastName;
	
	private String email;
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date birth;
	
	private Date createTime;
	
	private Department department;

	@GeneratedValue
	@Id
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Temporal(TemporalType.DATE)
	public Date getBirth() {
		return birth;
	}

	public void setBirth(Date birth) {
		this.birth = birth;
	}

	@Temporal(TemporalType.TIMESTAMP)
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@JoinColumn(name="DEPARTMENT_ID")
	@ManyToOne(fetch=FetchType.LAZY)
	public Department getDepartment() {
		return department;
	}

	public void setDepartment(Department department) {
		this.department = department;
	}
}
最近下载更多
fengshengtian  LV8 2022年2月26日
2235140624  LV17 2021年8月18日
q503030950  LV2 2021年8月5日
250979238  LV2 2021年1月24日
郑立祥  LV1 2020年3月15日
SWR0302  LV1 2020年3月12日
chenqiwu  LV1 2020年1月30日
氪氪超爱氪氪  LV10 2020年1月14日
josephlong  LV1 2019年10月21日
天使说他爱笑  LV1 2019年10月7日
最近浏览更多
and123456  LV11 2023年4月5日
fengshengtian  LV8 2022年2月26日
暂无贡献等级
liangge2115  LV27 2021年12月6日
CrystalQ  LV8 2021年11月20日
三岁就很帅  LV6 2021年9月16日
2235140624  LV17 2021年8月18日
东方星空  LV1 2021年8月6日
c15042361021  LV4 2021年7月8日
徐万强  LV9 2021年6月2日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友