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 status;
    private long effectiveTime;
    private String resName;
    private String resUrl;
    private String imageURL;


    /**
     * 自定義字段
     */
    @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;


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

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

    public Function(@NotNull Long id, int status, long effectiveTime,
                    String resName, String resUrl, String imageURL) {
        this.id = id;
        this.status = status;
        this.effectiveTime = effectiveTime;
        this.resName = resName;
        this.resUrl = resUrl;
        this.imageURL = imageURL;
    }

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

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

    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;
    }

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

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

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