package com.palmnest.model.lingling;

import com.palmnest.model.estateserve.AppUser;

import org.codehaus.jackson.annotate.JsonIgnore;

import javax.persistence.*;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author HIAPAD
 * @Description 令令开门实体卡实体类
 * @Date 2018/12/10 15:43
 **/
@Entity
@Table(name = "tb_lingling_card")
public class LingLingCard implements Serializable {

	private static final long serialVersionUID = 680185452738370807L;

	private Long    id;
	private String  cardCode;
	private Date    createTime;
//	private AppUser user;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return id;
	}

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

	@Column(name = "card_code")
	public String getCardCode() {
		return cardCode;
	}

	public void setCardCode(String cardCode) {
		this.cardCode = cardCode;
	}

	@Column(name = "create_time")
	public Date getCreateTime() {
		return createTime;
	}

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

//	@Transient
//	@JsonIgnore
//	@OneToOne(fetch = FetchType.EAGER)
//	@JoinTable(name = "tr_user_lingling_card", joinColumns = {@JoinColumn(name = "card_id")}, inverseJoinColumns = @JoinColumn(name = "user_id"))
//	public AppUser getUser() {
//		return user;
//	}
//
//	public void setUser(AppUser user) {
//		this.user = user;
//	}
}
