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


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

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

@Entity
public class Function {

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

    @NotNull
    private Long id;

    private int parentId;
    private int groupId;
    private long effectiveTime;
    private String resName;
    private String resUrl;
    private String imageURL;
    //暫時沒有imageURL，用本地資源代替
    private int icRes;
    /**狀態
     * 0 未开通
     * 1 正常
     * 2 有時間限制
     * 3 關閉
     * */
    private int status;

    @Transient
    public static final int STATUS_NONACTIVATED = 0;
    @Transient
    public static final int STATUS_NONAL = 1;
    @Transient
    public static final int STATUS_TIME_LIMIT = 2;
    @Transient
    public static final int STATUS_CLOSE = 3;
    /**
     * 自定義字段
     */
    @Transient
    private int textColor;
    @Transient
    private int backgroundColor;
    @Transient
    private int textSize;

    @Transient
    private int nameRes;
    @Transient
    private int textColorRes;
    @Transient
    private int backgroundColorRes;
    @Transient
    private int textSizeRes;
    @Transient
    private int iconRes;

    @Transient
    private String lable;

    @Generated(hash = 756881616)
    public Function(Long dbid, @NotNull Long id, int parentId, int groupId, long effectiveTime,
            String resName, String resUrl, String imageURL, int icRes, int status) {
        this.dbid = dbid;
        this.id = id;
        this.parentId = parentId;
        this.groupId = groupId;
        this.effectiveTime = effectiveTime;
        this.resName = resName;
        this.resUrl = resUrl;
        this.imageURL = imageURL;
        this.icRes = icRes;
        this.status = status;
    }

    @Generated(hash = 133141990)
    public Function() {
    }

    public Function(Long id, String resName, int textColorRes, int textSizeRes, int iconRes) {
        this.id = id;
        this.resName = resName;
        this.textColorRes = textColorRes;
        this.textSizeRes = textSizeRes;
        this.iconRes = iconRes;
    }

    public Function(String resName, int textColor, int backgroundColor, int textSize) {
        this.resName = resName;
        this.textColor = textColor;
        this.backgroundColor = backgroundColor;
        this.textSize = textSize;
    }

    public Function(Long id, int parentId, int groupId, String resName, int icRes, int status) {
        this.id = id;
        this.parentId = parentId;
        this.groupId = groupId;
        this.resName = resName;
        this.icRes = icRes;
        this.status = status;
    }

    public Function(int nameRes, int textColorRes, int backgroundColorRes, int textSizeRes) {
        this.nameRes = nameRes;
        this.textColorRes = textColorRes;
        this.backgroundColorRes = backgroundColorRes;
        this.textSizeRes = textSizeRes;
    }

    public Function(String resUrl, int iconRes) {
        this.resUrl = resUrl;
        this.iconRes = iconRes;
    }

    public Long getId() {
        return id;
    }

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

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public long getEffectiveTime() {
        return effectiveTime;
    }

    public void setEffectiveTime(long effectiveTime) {
        this.effectiveTime = effectiveTime;
    }

    public String getResName() {
        return resName;
    }

    public void setResName(String resName) {
        this.resName = resName;
    }

    public String getResUrl() {
        return resUrl;
    }

    public void setResUrl(String resUrl) {
        this.resUrl = resUrl;
    }

    public String getImageURL() {
        return imageURL;
    }

    public void setImageURL(String imageURL) {
        this.imageURL = imageURL;
    }

    public int getNameRes() {
        return nameRes;
    }

    public void setNameRes(int nameRes) {
        this.nameRes = nameRes;
    }

    public int getTextColor() {
        return textColor;
    }

    public void setTextColor(int textColor) {
        this.textColor = textColor;
    }

    public int getBackgroundColor() {
        return backgroundColor;
    }

    public void setBackgroundColor(int backgroundColor) {
        this.backgroundColor = backgroundColor;
    }

    public int getTextSize() {
        return textSize;
    }

    public void setTextSize(int textSize) {
        this.textSize = textSize;
    }

    public int getTextColorRes() {
        return textColorRes;
    }

    public void setTextColorRes(int textColorRes) {
        this.textColorRes = textColorRes;
    }

    public int getBackgroundColorRes() {
        return backgroundColorRes;
    }

    public void setBackgroundColorRes(int backgroundColorRes) {
        this.backgroundColorRes = backgroundColorRes;
    }

    public int getTextSizeRes() {
        return textSizeRes;
    }

    public void setTextSizeRes(int textSizeRes) {
        this.textSizeRes = textSizeRes;
    }

    public int getIconRes() {
        return iconRes;
    }

    public void setIconRes(int iconRes) {
        this.iconRes = iconRes;
    }

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

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

    public int getParentId() {
        return this.parentId;
    }

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

    public int getGroupId() {
        return this.groupId;
    }

    public void setGroupId(int groupId) {
        this.groupId = groupId;
    }

    public int getIcRes() {
        return this.icRes;
    }

    public void setIcRes(int icRes) {
        this.icRes = icRes;
    }

    public String getLable() {
        return lable;
    }

    public void setLable(String lable) {
        this.lable = lable;
    }

    @Override
    public String toString() {
        return "Function{" +
                "dbid=" + dbid +
                ", id=" + id +
                ", parentId=" + parentId +
                ", groupId=" + groupId +
                ", status=" + status +
                ", effectiveTime=" + effectiveTime +
                ", resName='" + resName + '\'' +
                ", resUrl='" + resUrl + '\'' +
                ", imageURL='" + imageURL + '\'' +
                ", icRes=" + icRes +
                ", textColor=" + textColor +
                ", backgroundColor=" + backgroundColor +
                ", textSize=" + textSize +
                ", nameRes=" + nameRes +
                ", textColorRes=" + textColorRes +
                ", backgroundColorRes=" + backgroundColorRes +
                ", textSizeRes=" + textSizeRes +
                ", iconRes=" + iconRes +
                ", lable='" + lable + '\'' +
                '}';
    }
}
