package com.reyun.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

/**
 * Created by sunhao on 17/4/20.
 * desc:看单主表
 */
@Entity
public class CustomMenu {

    private Long id;

    private String name;

    private Date createDate;

    private Long createAccount;

    private String createAccountName;

    private Long appId;

    private Long category;

    private String categoryName;
    //是自建看单还是来自分享的看单,false自建,true分享
    private Boolean source;
    //分享看单的Id
    private Long shareId;
    //分享者ID
    private Long shareAccountId;
    //分享者名称
    private String shareAccountName;
    //分享时间
    private Date shareDate;
    //看单排序
    private Integer menuOrder;
    //是否已经分享过,不能标示为是否是自己分享过,只能用于前台显示是否能再次分享。
    private Boolean hasShare;

    private Long modifyAccount;

    private Date modifyDate;

    private Boolean delFlag;
    //看单显示顺序
    private Integer orderindex;

    //Transient,展示模板列表
    private List<CustomMenuTemplate> templates;


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

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

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Long getCreateAccount() {
        return createAccount;
    }

    public void setCreateAccount(Long createAccount) {
        this.createAccount = createAccount;
    }

    public String getCreateAccountName() {
        return createAccountName;
    }

    public void setCreateAccountName(String createAccountName) {
        this.createAccountName = createAccountName;
    }

    public Long getAppId() {
        return appId;
    }

    public void setAppId(Long appId) {
        this.appId = appId;
    }

    public Long getCategory() {
        return category;
    }

    public void setCategory(Long category) {
        this.category = category;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public Boolean getSource() {
        return source;
    }

    public void setSource(Boolean source) {
        this.source = source;
    }

    public Long getShareId() {
        return shareId;
    }

    public void setShareId(Long shareId) {
        this.shareId = shareId;
    }

    public Long getShareAccountId() {
        return shareAccountId;
    }

    public void setShareAccountId(Long shareAccountId) {
        this.shareAccountId = shareAccountId;
    }

    public String getShareAccountName() {
        return shareAccountName;
    }

    public void setShareAccountName(String shareAccountName) {
        this.shareAccountName = shareAccountName;
    }

    public Date getShareDate() {
        return shareDate;
    }

    public void setShareDate(Date shareDate) {
        this.shareDate = shareDate;
    }

    public Integer getMenuOrder() {
        return menuOrder;
    }

    public void setMenuOrder(Integer menuOrder) {
        this.menuOrder = menuOrder;
    }

    @Transient
    public List<CustomMenuTemplate> getTemplates() {
        return templates;
    }

    public void setTemplates(List<CustomMenuTemplate> templates) {
        this.templates = templates;
    }

    public Long getModifyAccount() {
        return modifyAccount;
    }

    public void setModifyAccount(Long modifyAccount) {
        this.modifyAccount = modifyAccount;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    public Boolean getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Boolean delFlag) {
        this.delFlag = delFlag;
    }

    public Boolean getHasShare() {
        return hasShare;
    }

    public void setHasShare(Boolean hasShare) {
        this.hasShare = hasShare;
    }

    public Integer getOrderindex() {
        return orderindex;
    }

    public void setOrderindex(Integer orderindex) {
        this.orderindex = orderindex;
    }
}
