package com.gingersoft.gsa.cloud.database.bean;

import android.graphics.Color;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Property;
import org.greenrobot.greendao.annotation.Transient;
import org.jetbrains.annotations.NotNull;

import java.util.Date;

/**
 * 作者：ELEGANT_BIN
 * 版本：1.6.0
 * 创建日期：2020-01-02
 * 修订历史：2020-01-02
 * 描述：
 */

@Entity
public class Food {

    @Property(nameInDb = "_id")
    @Id(autoincrement = true)
    private Long dbid;

    /**食品ID*/
    private Long id;
    /**上級ID (如0=最高級)*/
    private Long parentId;
    /**商户ID*/
    private Long restaurantId;

    private String fid;
    /**是否組別*/
    private Byte isParent;
    /**排序*/
    private Long seqNo;
    /**名稱1*/
    private String foodName;
    /**本地对应ID*/
    private String posFid;
    /**描述*/
    private String foodDesc;
    /**限制比例#0不做判断;（人数*N）*/
    private Long limitAmount;
    /**限制类型#1:表示每次送单限制 ;2:表示整单限制*/
    private Long limitType;
    /**餐种*/
    private Long foodSummary;
    /**0=顯示, 1=隱藏, 2=暫停,3=只显示,不操作*/
    private Long invisible;
    /**自動跳出細項頁*/
    private Byte autoMod;
    /**金額*/
    private Double price;
    /**原價 (刪除線)*/
    private Double marketPrice;
    /**餐盒费*/
    private Double lunchboxPrice;
    /**食品小图片*/
    private String imgUrlSmall;
    /**食品大图片*/
    private String imageurl;
    /**ricepon显示状态，当为0的时候，取Invisible的状态:0=顯示, 1=隱藏, 2=暫停*/
    private Long riceponInvisible;
    /**成本*/
    private Double cost;
    /**開始日期*/
    private Date startDate;
    /**結束日期*/
    private Date endDate;
    /**贊*/
    private Long like;
    /**已售*/
    private Long totalSold;
    /**是否显示已售*/
    private Long isSold;
    /**创建人*/
    private String createBy;

    private Date createTime;
    /**更新人*/
    private String updateBy;
    /**更新时间*/
    private Date updateTime;
    /**時段, 請關聯到m_period_info*/
    private Long periodId;
    /**是否参与折扣#1:可折扣*/
    private Long ableDiscount;
    /**是否外卖#0:是;1:否*/
    private Long takeaway;
    /**餐頁面中藍色按鈕有沒有編輯按鈕  (筆的圖按) 0=不可編輯 1=可編輯*/
    private Long blueEdit;
    /**購物車中是否可編輯  (加入口味)  0=隱藏購物車中食品的編輯按鈕 1=顯示按鈕*/
    private Long cartEdit;
    /**相同項目自動合併 0=不自動合併 1=自動合併*/
    private Long autoMerge;
    /**食品名称1*/
    private String foodName1;
    /**食品名称2*/
    private String foodName2;
    /**自定義食品編號*/
    private String plu;
    /**打印設定, 用逗號分隔, *=切紙*/
    private String printSeting;
    /**是否打印叫号小票*/
    private Long isPrintQueueCode;
    /**打印叫号小票对应队ID*/
    private Long queueHeadId;
    /**是否需要經理批準*/
    private Long approve;
    /**0=系統顏色, 1=黑色, 2=紅色*/
    private Long printFont;
    /**自動顯示細項*/
    private Long advPrice;
    /**當金額=0時, 是否打印在帳單上*/
    private Long printToBill;
    /**額外食品加分*/
    private Double pointsAdd;
    /**額外積分比率*/
    private Long pointsRatio;
    /**換購食品所需積分*/
    private Double pointsRedeem;
    /**是否打印主项*/
    private Long ktPrintMainItem;
    /**是否打印价格*/
    private Long ktShowPrice;
    /**0食品清单打印 账单打印//1食品清单不打印 账单不打印//2食品清单打印 账单不打印//3食品清单不打印 账单打印*/
    private Long printTo;
    /**食品数量是否同步 餐台人数*/
    private Long toPax;
    /**食品类型 0普通食品 1称重食品*/
    private Long foodType;
    /**gspos自定义表中的Id*/
    private Long majorMainId;
    /**部门Id*/
    private Long deptId;
    /**是否收取服務費*/
    private Byte serviceCharge;
    /**顏色ID*/
    private Long colorId;
    /**0:新增；1:修改；2:刪除*/
    private Long conditions;
    /**是否同步 0：否 1：是*/
    private Long isRt;
    /**是否删除：0正常，1删除*/
    private Long deletes;
    /**是否時長食物 0=普通食品   1=計費食品  2=免費N小時   3=時段對沖   4=入場費食品*/
    private Long isTimingFood;
    /**最低持續時間*/
    private Long minLongTime;

    private Long unitTime;
    /**單位價格*/
    private Double unitPrice;
    /**免費時間(小時)*/
    private Long freeLongTime;
    /**免費開始時間*/
    private Date freePeriodBegin;
    /**是否參與會員喜好統計 0 參與  1 不參與*/
    private Long isStatistic;


    /**
     *
     * 自定義字段
     *
     */

    @Transient
    /**選中數量*/
    private int number;
    @Transient
    /**背景顏色*/
    private int bgColor = Color.parseColor("#03a9f4");
    @Transient
    /**字體顏色*/
    private int fontColor = Color.parseColor("#FFFFFF");
    @Transient
    /**最大選中數*/
    private int maxNumber =99;
    @Transient
    /**是否選中*/
    private boolean selected;


    @Generated(hash = 1004134489)
    public Food(Long dbid, Long id, Long parentId, Long restaurantId, String fid,
            Byte isParent, Long seqNo, String foodName, String posFid,
            String foodDesc, Long limitAmount, Long limitType, Long foodSummary,
            Long invisible, Byte autoMod, Double price, Double marketPrice,
            Double lunchboxPrice, String imgUrlSmall, String imageurl,
            Long riceponInvisible, Double cost, Date startDate, Date endDate,
            Long like, Long totalSold, Long isSold, String createBy,
            Date createTime, String updateBy, Date updateTime, Long periodId,
            Long ableDiscount, Long takeaway, Long blueEdit, Long cartEdit,
            Long autoMerge, String foodName1, String foodName2, String plu,
            String printSeting, Long isPrintQueueCode, Long queueHeadId,
            Long approve, Long printFont, Long advPrice, Long printToBill,
            Double pointsAdd, Long pointsRatio, Double pointsRedeem,
            Long ktPrintMainItem, Long ktShowPrice, Long printTo, Long toPax,
            Long foodType, Long majorMainId, Long deptId, Byte serviceCharge,
            Long colorId, Long conditions, Long isRt, Long deletes,
            Long isTimingFood, Long minLongTime, Long unitTime, Double unitPrice,
            Long freeLongTime, Date freePeriodBegin, Long isStatistic) {
        this.dbid = dbid;
        this.id = id;
        this.parentId = parentId;
        this.restaurantId = restaurantId;
        this.fid = fid;
        this.isParent = isParent;
        this.seqNo = seqNo;
        this.foodName = foodName;
        this.posFid = posFid;
        this.foodDesc = foodDesc;
        this.limitAmount = limitAmount;
        this.limitType = limitType;
        this.foodSummary = foodSummary;
        this.invisible = invisible;
        this.autoMod = autoMod;
        this.price = price;
        this.marketPrice = marketPrice;
        this.lunchboxPrice = lunchboxPrice;
        this.imgUrlSmall = imgUrlSmall;
        this.imageurl = imageurl;
        this.riceponInvisible = riceponInvisible;
        this.cost = cost;
        this.startDate = startDate;
        this.endDate = endDate;
        this.like = like;
        this.totalSold = totalSold;
        this.isSold = isSold;
        this.createBy = createBy;
        this.createTime = createTime;
        this.updateBy = updateBy;
        this.updateTime = updateTime;
        this.periodId = periodId;
        this.ableDiscount = ableDiscount;
        this.takeaway = takeaway;
        this.blueEdit = blueEdit;
        this.cartEdit = cartEdit;
        this.autoMerge = autoMerge;
        this.foodName1 = foodName1;
        this.foodName2 = foodName2;
        this.plu = plu;
        this.printSeting = printSeting;
        this.isPrintQueueCode = isPrintQueueCode;
        this.queueHeadId = queueHeadId;
        this.approve = approve;
        this.printFont = printFont;
        this.advPrice = advPrice;
        this.printToBill = printToBill;
        this.pointsAdd = pointsAdd;
        this.pointsRatio = pointsRatio;
        this.pointsRedeem = pointsRedeem;
        this.ktPrintMainItem = ktPrintMainItem;
        this.ktShowPrice = ktShowPrice;
        this.printTo = printTo;
        this.toPax = toPax;
        this.foodType = foodType;
        this.majorMainId = majorMainId;
        this.deptId = deptId;
        this.serviceCharge = serviceCharge;
        this.colorId = colorId;
        this.conditions = conditions;
        this.isRt = isRt;
        this.deletes = deletes;
        this.isTimingFood = isTimingFood;
        this.minLongTime = minLongTime;
        this.unitTime = unitTime;
        this.unitPrice = unitPrice;
        this.freeLongTime = freeLongTime;
        this.freePeriodBegin = freePeriodBegin;
        this.isStatistic = isStatistic;
    }

    @Generated(hash = 866324199)
    public Food() {
    }


    public Long getId() {
        return id;
    }

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

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Long getRestaurantId() {
        return restaurantId;
    }

    public void setRestaurantId(Long restaurantId) {
        this.restaurantId = restaurantId;
    }

    public String getFid() {
        return fid;
    }

    public void setFid(String fid) {
        this.fid = fid;
    }

    public Byte getIsParent() {
        return isParent;
    }

    public void setIsParent(Byte isParent) {
        this.isParent = isParent;
    }

    public Long getSeqNo() {
        return seqNo;
    }

    public void setSeqNo(Long seqNo) {
        this.seqNo = seqNo;
    }

    public String getFoodName() {
        return foodName;
    }

    public void setFoodName(String foodName) {
        this.foodName = foodName;
    }

    public String getPosFid() {
        return posFid;
    }

    public void setPosFid(String posFid) {
        this.posFid = posFid;
    }

    public String getFoodDesc() {
        return foodDesc;
    }

    public void setFoodDesc(String foodDesc) {
        this.foodDesc = foodDesc;
    }

    public Long getLimitAmount() {
        return limitAmount;
    }

    public void setLimitAmount(Long limitAmount) {
        this.limitAmount = limitAmount;
    }

    public Long getLimitType() {
        return limitType;
    }

    public void setLimitType(Long limitType) {
        this.limitType = limitType;
    }

    public Long getFoodSummary() {
        return foodSummary;
    }

    public void setFoodSummary(Long foodSummary) {
        this.foodSummary = foodSummary;
    }

    public Long getInvisible() {
        return invisible;
    }

    public void setInvisible(Long invisible) {
        this.invisible = invisible;
    }

    public Byte getAutoMod() {
        return autoMod;
    }

    public void setAutoMod(Byte autoMod) {
        this.autoMod = autoMod;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Double getMarketPrice() {
        return marketPrice;
    }

    public void setMarketPrice(Double marketPrice) {
        this.marketPrice = marketPrice;
    }

    public Double getLunchboxPrice() {
        return lunchboxPrice;
    }

    public void setLunchboxPrice(Double lunchboxPrice) {
        this.lunchboxPrice = lunchboxPrice;
    }

    public String getImgUrlSmall() {
        return imgUrlSmall;
    }

    public void setImgUrlSmall(String imgUrlSmall) {
        this.imgUrlSmall = imgUrlSmall;
    }

    public String getImageurl() {
        return imageurl;
    }

    public void setImageurl(String imageurl) {
        this.imageurl = imageurl;
    }

    public Long getRiceponInvisible() {
        return riceponInvisible;
    }

    public void setRiceponInvisible(Long riceponInvisible) {
        this.riceponInvisible = riceponInvisible;
    }

    public Double getCost() {
        return cost;
    }

    public void setCost(Double cost) {
        this.cost = cost;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Long getLike() {
        return like;
    }

    public void setLike(Long like) {
        this.like = like;
    }

    public Long getTotalSold() {
        return totalSold;
    }

    public void setTotalSold(Long totalSold) {
        this.totalSold = totalSold;
    }

    public Long getIsSold() {
        return isSold;
    }

    public void setIsSold(Long isSold) {
        this.isSold = isSold;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getCreateTime() {
        return createTime;
    }

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

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Long getPeriodId() {
        return periodId;
    }

    public void setPeriodId(Long periodId) {
        this.periodId = periodId;
    }

    public Long getAbleDiscount() {
        return ableDiscount;
    }

    public void setAbleDiscount(Long ableDiscount) {
        this.ableDiscount = ableDiscount;
    }

    public Long getTakeaway() {
        return takeaway;
    }

    public void setTakeaway(Long takeaway) {
        this.takeaway = takeaway;
    }

    public Long getBlueEdit() {
        return blueEdit;
    }

    public void setBlueEdit(Long blueEdit) {
        this.blueEdit = blueEdit;
    }

    public Long getCartEdit() {
        return cartEdit;
    }

    public void setCartEdit(Long cartEdit) {
        this.cartEdit = cartEdit;
    }

    public Long getAutoMerge() {
        return autoMerge;
    }

    public void setAutoMerge(Long autoMerge) {
        this.autoMerge = autoMerge;
    }

    public String getFoodName1() {
        return foodName1;
    }

    public void setFoodName1(String foodName1) {
        this.foodName1 = foodName1;
    }

    public String getFoodName2() {
        return foodName2;
    }

    public void setFoodName2(String foodName2) {
        this.foodName2 = foodName2;
    }

    public String getPlu() {
        return plu;
    }

    public void setPlu(String plu) {
        this.plu = plu;
    }

    public String getPrintSeting() {
        return printSeting;
    }

    public void setPrintSeting(String printSeting) {
        this.printSeting = printSeting;
    }

    public Long getIsPrintQueueCode() {
        return isPrintQueueCode;
    }

    public void setIsPrintQueueCode(Long isPrintQueueCode) {
        this.isPrintQueueCode = isPrintQueueCode;
    }

    public Long getQueueHeadId() {
        return queueHeadId;
    }

    public void setQueueHeadId(Long queueHeadId) {
        this.queueHeadId = queueHeadId;
    }

    public Long getApprove() {
        return approve;
    }

    public void setApprove(Long approve) {
        this.approve = approve;
    }

    public Long getPrintFont() {
        return printFont;
    }

    public void setPrintFont(Long printFont) {
        this.printFont = printFont;
    }

    public Long getAdvPrice() {
        return advPrice;
    }

    public void setAdvPrice(Long advPrice) {
        this.advPrice = advPrice;
    }

    public Long getPrintToBill() {
        return printToBill;
    }

    public void setPrintToBill(Long printToBill) {
        this.printToBill = printToBill;
    }

    public Double getPointsAdd() {
        return pointsAdd;
    }

    public void setPointsAdd(Double pointsAdd) {
        this.pointsAdd = pointsAdd;
    }

    public Long getPointsRatio() {
        return pointsRatio;
    }

    public void setPointsRatio(Long pointsRatio) {
        this.pointsRatio = pointsRatio;
    }

    public Double getPointsRedeem() {
        return pointsRedeem;
    }

    public void setPointsRedeem(Double pointsRedeem) {
        this.pointsRedeem = pointsRedeem;
    }

    public Long getKtPrintMainItem() {
        return ktPrintMainItem;
    }

    public void setKtPrintMainItem(Long ktPrintMainItem) {
        this.ktPrintMainItem = ktPrintMainItem;
    }

    public Long getKtShowPrice() {
        return ktShowPrice;
    }

    public void setKtShowPrice(Long ktShowPrice) {
        this.ktShowPrice = ktShowPrice;
    }

    public Long getPrintTo() {
        return printTo;
    }

    public void setPrintTo(Long printTo) {
        this.printTo = printTo;
    }

    public Long getToPax() {
        return toPax;
    }

    public void setToPax(Long toPax) {
        this.toPax = toPax;
    }

    public Long getFoodType() {
        return foodType;
    }

    public void setFoodType(Long foodType) {
        this.foodType = foodType;
    }

    public Long getMajorMainId() {
        return majorMainId;
    }

    public void setMajorMainId(Long majorMainId) {
        this.majorMainId = majorMainId;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Byte getServiceCharge() {
        return serviceCharge;
    }

    public void setServiceCharge(Byte serviceCharge) {
        this.serviceCharge = serviceCharge;
    }

    public Long getColorId() {
        return colorId;
    }

    public void setColorId(Long colorId) {
        this.colorId = colorId;
    }

    public Long getConditions() {
        return conditions;
    }

    public void setConditions(Long conditions) {
        this.conditions = conditions;
    }

    public Long getIsRt() {
        return isRt;
    }

    public void setIsRt(Long isRt) {
        this.isRt = isRt;
    }

    public Long getDeletes() {
        return deletes;
    }

    public void setDeletes(Long deletes) {
        this.deletes = deletes;
    }

    public Long getIsTimingFood() {
        return isTimingFood;
    }

    public void setIsTimingFood(Long isTimingFood) {
        this.isTimingFood = isTimingFood;
    }

    public Long getMinLongTime() {
        return minLongTime;
    }

    public void setMinLongTime(Long minLongTime) {
        this.minLongTime = minLongTime;
    }

    public Long getUnitTime() {
        return unitTime;
    }

    public void setUnitTime(Long unitTime) {
        this.unitTime = unitTime;
    }

    public Double getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(Double unitPrice) {
        this.unitPrice = unitPrice;
    }

    public Long getFreeLongTime() {
        return freeLongTime;
    }

    public void setFreeLongTime(Long freeLongTime) {
        this.freeLongTime = freeLongTime;
    }

    public Date getFreePeriodBegin() {
        return freePeriodBegin;
    }

    public void setFreePeriodBegin(Date freePeriodBegin) {
        this.freePeriodBegin = freePeriodBegin;
    }

    public Long getIsStatistic() {
        return isStatistic;
    }

    public void setIsStatistic(Long isStatistic) {
        this.isStatistic = isStatistic;
    }

    public Long getDbid() {
        return this.dbid;
    }

    public void setDbid(Long dbid) {
        this.dbid = dbid;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public int getBgColor() {
        return bgColor;
    }

    public void setBgColor(int bgColor) {
        this.bgColor = bgColor;
    }

    public int getFontColor() {
        return fontColor;
    }

    public void setFontColor(int fontColor) {
        this.fontColor = fontColor;
    }

    public int getMaxNumber() {
        return maxNumber;
    }

    public void setMaxNumber(int maxNumber) {
        this.maxNumber = maxNumber;
    }

    public boolean isSelected() {
        return selected;
    }

    public void setSelected(boolean selected) {
        this.selected = selected;
    }
}
