package com.tofly.ghrq_route.module.job.domain;

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 java.io.Serializable;

import org.greenrobot.greendao.annotation.Generated;

@Entity(nameInDb = "DB_MY_JOB_BEAN")
@SuppressWarnings("serial")
public class JobBean implements Serializable {
    /**
     * id : c6e56f1f005e4dd9bc8103e16b0333d8
     * caption : 17010505
     * longitude : 357730.321724093
     * latitude : 3281048.91622318
     * dispatch_realname : 用户5
     * dispatch_date : 2017-01-05 11:02:04
     * task_status : 0
     * taskbh : 2017010511241I047741
     */

    public static final String JOB_BEAN_KEY = "job_bean";
    public static final String JOB_POSITION_KEY = "job_position";

    public enum JOB_TASK_STATUS {
        JOB_TASK_UNHANDLED(0),
        JOB_TASK_UNCOMMIT(-1),
        JOB_TASK_COMMITED(1);

        JOB_TASK_STATUS(int status) {
            this.status = status;
        }

        public int getStatus() {
            return status;
        }

        public static JOB_TASK_STATUS Status(int status) {
            switch (status) {
                case 0:
                    return JOB_TASK_UNHANDLED;
                case -1:
                    return JOB_TASK_UNCOMMIT;
                case 1:
                    return JOB_TASK_COMMITED;
            }
            return JOB_TASK_UNHANDLED;
        }

        final int status;
    }

    @Id @NotNull @Unique
    private String id;
    private String caption;
    private double longitude;  //维度
    private double latitude;   //经度
    private double x;         //投影坐标系x
    private double y;         //投影坐标系y
    private String dispatchRealname;
    private String dispatchDate;      //派工日期
    private String planFinishDate;    //计划完工时间
    private String finishDate;        //实际完工时间
    private int taskStatus;  //任务状态, 0为未处理，1为已处理，2为已取消
    private String userid;
    private String content;
    private String taskbh;
    private String handleRecord;
    private String address;
    private int commit_status;
    @Generated(hash = 1343964298)
    public JobBean(@NotNull String id, String caption, double longitude,
            double latitude, double x, double y, String dispatchRealname,
            String dispatchDate, String planFinishDate, String finishDate,
            int taskStatus, String userid, String content, String taskbh,
            String handleRecord, String address, int commit_status) {
        this.id = id;
        this.caption = caption;
        this.longitude = longitude;
        this.latitude = latitude;
        this.x = x;
        this.y = y;
        this.dispatchRealname = dispatchRealname;
        this.dispatchDate = dispatchDate;
        this.planFinishDate = planFinishDate;
        this.finishDate = finishDate;
        this.taskStatus = taskStatus;
        this.userid = userid;
        this.content = content;
        this.taskbh = taskbh;
        this.handleRecord = handleRecord;
        this.address = address;
        this.commit_status = commit_status;
    }
    @Generated(hash = 1640424783)
    public JobBean() {
    }
    public String getId() {
        return this.id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getCaption() {
        return this.caption;
    }
    public void setCaption(String caption) {
        this.caption = caption;
    }
    public double getLongitude() {
        return this.longitude;
    }
    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }
    public double getLatitude() {
        return this.latitude;
    }
    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }
    public double getX() {
        return this.x;
    }
    public void setX(double x) {
        this.x = x;
    }
    public double getY() {
        return this.y;
    }
    public void setY(double y) {
        this.y = y;
    }
    public String getDispatchRealname() {
        return this.dispatchRealname;
    }
    public void setDispatchRealname(String dispatchRealname) {
        this.dispatchRealname = dispatchRealname;
    }
    public String getDispatchDate() {
        return this.dispatchDate;
    }
    public void setDispatchDate(String dispatchDate) {
        this.dispatchDate = dispatchDate;
    }
    public String getPlanFinishDate() {
        return this.planFinishDate;
    }
    public void setPlanFinishDate(String planFinishDate) {
        this.planFinishDate = planFinishDate;
    }
    public int getTaskStatus() {
        return this.taskStatus;
    }
    public void setTaskStatus(int taskStatus) {
        this.taskStatus = taskStatus;
    }
    public String getUserid() {
        return this.userid;
    }
    public void setUserid(String userid) {
        this.userid = userid;
    }
    public String getContent() {
        return this.content;
    }
    public void setContent(String content) {
        this.content = content;
    }
    public String getTaskbh() {
        return this.taskbh;
    }
    public void setTaskbh(String taskbh) {
        this.taskbh = taskbh;
    }
    public String getHandleRecord() {
        return this.handleRecord;
    }
    public void setHandleRecord(String handleRecord) {
        this.handleRecord = handleRecord;
    }
    public String getAddress() {
        return this.address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
    public int getCommit_status() {
        return this.commit_status;
    }
    public void setCommit_status(int commit_status) {
        this.commit_status = commit_status;
    }
    public String getFinishDate() {
        return this.finishDate;
    }
    public void setFinishDate(String finishDate) {
        this.finishDate = finishDate;
    }
        

}
