package com.mossle.card.persistence.domain;

// Generated by Hibernate Tools
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CardInfo .
 * 
 * @author Lingo
 */
@Entity
@Table(name = "CARD_INFO")
public class CardInfo implements java.io.Serializable {
    private static final long serialVersionUID = 0L;

    /** null. */
    private Long id;

    /** null. */
    private String type;

    /** null. */
    private String code;

    /** null. */
    private String userId;

    /** null. */
    private Date createTime;

    /** null. */
    private String operateUser;

    /** null. */
    private Date operateTime;

    /** null. */
    private String operateLocation;

    /** null. */
    private String status;

    /** null. */
    private String description;

    /** null. */
    private String tenantId;

    /** . */
    private Set<DoorInfo> doorInfos = new HashSet<DoorInfo>(0);

    public CardInfo() {
    }

    public CardInfo(Long id) {
        this.id = id;
    }

    public CardInfo(Long id, String type, String code, String userId,
            Date createTime, String operateUser, Date operateTime,
            String operateLocation, String status, String description,
            String tenantId, Set<DoorInfo> doorInfos) {
        this.id = id;
        this.type = type;
        this.code = code;
        this.userId = userId;
        this.createTime = createTime;
        this.operateUser = operateUser;
        this.operateTime = operateTime;
        this.operateLocation = operateLocation;
        this.status = status;
        this.description = description;
        this.tenantId = tenantId;
        this.doorInfos = doorInfos;
    }

    /** @return null. */
    @Id
    @Column(name = "ID", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }

    /**
     * @param id
     *            null.
     */
    public void setId(Long id) {
        this.id = id;
    }

    /** @return null. */
    @Column(name = "TYPE", length = 50)
    public String getType() {
        return this.type;
    }

    /**
     * @param type
     *            null.
     */
    public void setType(String type) {
        this.type = type;
    }

    /** @return null. */
    @Column(name = "CODE", length = 200)
    public String getCode() {
        return this.code;
    }

    /**
     * @param code
     *            null.
     */
    public void setCode(String code) {
        this.code = code;
    }

    /** @return null. */
    @Column(name = "USER_ID", length = 64)
    public String getUserId() {
        return this.userId;
    }

    /**
     * @param userId
     *            null.
     */
    public void setUserId(String userId) {
        this.userId = userId;
    }

    /** @return null. */
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "CREATE_TIME", length = 26)
    public Date getCreateTime() {
        return this.createTime;
    }

    /**
     * @param createTime
     *            null.
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /** @return null. */
    @Column(name = "OPERATE_USER", length = 64)
    public String getOperateUser() {
        return this.operateUser;
    }

    /**
     * @param operateUser
     *            null.
     */
    public void setOperateUser(String operateUser) {
        this.operateUser = operateUser;
    }

    /** @return null. */
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "OPERATE_TIME", length = 26)
    public Date getOperateTime() {
        return this.operateTime;
    }

    /**
     * @param operateTime
     *            null.
     */
    public void setOperateTime(Date operateTime) {
        this.operateTime = operateTime;
    }

    /** @return null. */
    @Column(name = "OPERATE_LOCATION", length = 200)
    public String getOperateLocation() {
        return this.operateLocation;
    }

    /**
     * @param operateLocation
     *            null.
     */
    public void setOperateLocation(String operateLocation) {
        this.operateLocation = operateLocation;
    }

    /** @return null. */
    @Column(name = "STATUS", length = 50)
    public String getStatus() {
        return this.status;
    }

    /**
     * @param status
     *            null.
     */
    public void setStatus(String status) {
        this.status = status;
    }

    /** @return null. */
    @Column(name = "DESCRIPTION", length = 200)
    public String getDescription() {
        return this.description;
    }

    /**
     * @param description
     *            null.
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /** @return null. */
    @Column(name = "TENANT_ID", length = 64)
    public String getTenantId() {
        return this.tenantId;
    }

    /**
     * @param tenantId
     *            null.
     */
    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    /** @return . */
    @ManyToMany(fetch = FetchType.LAZY)
    @JoinTable(name = "CARD_INFO_DOOR", joinColumns = { @JoinColumn(name = "INFO_ID", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "DOOR_ID", nullable = false, updatable = false) })
    public Set<DoorInfo> getDoorInfos() {
        return this.doorInfos;
    }

    /**
     * @param doorInfos
     *            .
     */
    public void setDoorInfos(Set<DoorInfo> doorInfos) {
        this.doorInfos = doorInfos;
    }
}
