package com.tofly.ghrq_route.module.notifyManage;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.NotNull;
import org.greenrobot.greendao.annotation.Unique;
import org.greenrobot.greendao.annotation.Generated;

@Entity(nameInDb = "DB_NOTIFY_MANAGE_BEAN")
public class NotifyManageBean {

    public enum NOTIFY_MSG_TYPE {
        NOTIFY_MSG_MESSAGE(1),
        NOTIFY_MSG_PLAN(2),
        NOTIFY_MSG_BUILD(3),
        NOTIFY_MSG_JOB(4),
        NOTIFY_MSG_EMERGENCY(5),
        NOTIFY_MSG_TROUBLE(6),
        NOTIFY_MSG_SURVEY(7);

        NOTIFY_MSG_TYPE(int type) {
            this.type = type;
        }

        public int getType() {
            return type;
        }

        public static NOTIFY_MSG_TYPE Type(int type) {
            switch (type) {
                case 1:
                    return NOTIFY_MSG_MESSAGE;
                case 2:
                    return NOTIFY_MSG_PLAN;
                case 3:
                    return NOTIFY_MSG_BUILD;
                case 4:
                    return NOTIFY_MSG_JOB;
                case 5:
                    return NOTIFY_MSG_EMERGENCY;
                case 6:
                    return NOTIFY_MSG_TROUBLE;
                case 7:
                    return NOTIFY_MSG_SURVEY;
            }
            return NOTIFY_MSG_MESSAGE;
        }

        final int type;
    }

    @Id @NotNull @Unique
    private String id;
    private String serverId;
    private String userid;
    private int notify_type;
    private boolean isNotify = false;  //是否通知过   0：未通知 1： 已通知
    private boolean isRead = false;    //是否已读内容  0：未读  1： 已读

    @Generated(hash = 333866845)
    public NotifyManageBean(@NotNull String id, String serverId, String userid,
            int notify_type, boolean isNotify, boolean isRead) {
        this.id = id;
        this.serverId = serverId;
        this.userid = userid;
        this.notify_type = notify_type;
        this.isNotify = isNotify;
        this.isRead = isRead;
    }
    @Generated(hash = 1756207165)
    public NotifyManageBean() {
    }
    public String getId() {
        return this.id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public int getNotify_type() {
        return this.notify_type;
    }
    public void setNotify_type(int notify_type) {
        this.notify_type = notify_type;
    }
    public boolean getIsNotify() {
        return this.isNotify;
    }
    public void setIsNotify(boolean isNotify) {
        this.isNotify = isNotify;
    }
    public boolean getIsRead() {
        return this.isRead;
    }
    public void setIsRead(boolean isRead) {
        this.isRead = isRead;
    }
    public String getServerId() {
        return this.serverId;
    }
    public void setServerId(String serverId) {
        this.serverId = serverId;
    }
    public String getUserid() {
        return this.userid;
    }
    public void setUserid(String userid) {
        this.userid = userid;
    }

}
