package com.tofly.ghrq_route.module.sketch.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;

/**
 * 草图对象
 * Created by li on 2016/11/11.
 */
@Entity(nameInDb = "DB_MY_SKETCH_BEAN")
@SuppressWarnings("serial")
public class SketchBean implements Serializable {

    public static final String SKETCH_BEAN_KEY = "sketch_bean";

    public enum SKETCH_TASK_STATUS {
        SKETCH_TASK_UNEDIT(-2),       //未编辑
        SKETCH_TASK_UNCOMMIT(-1),     //未上传
        SKETCH_TASK_COMMITED(0),      //已上传未处理
        SKETCH_TASK_HANDLED(1);       //已处理

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

        public int getStatus() {
            return status;
        }

        public static SKETCH_TASK_STATUS Status(int status) {
            switch (status) {
                case -2:
                    return SKETCH_TASK_UNEDIT;
                case -1:
                    return SKETCH_TASK_UNCOMMIT;
                case 0:
                    return SKETCH_TASK_COMMITED;
                case 1:
                    return SKETCH_TASK_HANDLED;
            }
            return SKETCH_TASK_UNCOMMIT;
        }

        final int status;
    }


    @Id @NotNull @Unique
    private String id;          //编号
    private String caption;     //标题
    private String content;     //内容
    private String createdate;  //创建日期
    private String handledate;  //处理日期
    private String address;   //地址信息
    private double longitude;  //维度
    private double latitude;   //经度
    private double x;         //投影坐标系x
    private double y;         //投影坐标系y
    private  int wkid;        //坐标系编号
    private double scale;     //地图比例尺
    private int status;       //任务状态, 0为未处理，1为已处理
    private String filepath;  //图片在本地保存的路径
    private String fileid;    //图片在服务器的地址
    private String userid;    //用户id
    private int commit_status;
    
    @Generated(hash = 2053113474)
    public SketchBean(@NotNull String id, String caption, String content,
            String createdate, String handledate, String address, double longitude,
            double latitude, double x, double y, int wkid, double scale, int status,
            String filepath, String fileid, String userid, int commit_status) {
        this.id = id;
        this.caption = caption;
        this.content = content;
        this.createdate = createdate;
        this.handledate = handledate;
        this.address = address;
        this.longitude = longitude;
        this.latitude = latitude;
        this.x = x;
        this.y = y;
        this.wkid = wkid;
        this.scale = scale;
        this.status = status;
        this.filepath = filepath;
        this.fileid = fileid;
        this.userid = userid;
        this.commit_status = commit_status;
    }
    @Generated(hash = 921937848)
    public SketchBean() {
    }
    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 String getContent() {
        return this.content;
    }
    public void setContent(String content) {
        this.content = content;
    }
    public String getCreatedate() {
        return this.createdate;
    }
    public void setCreatedate(String createdate) {
        this.createdate = createdate;
    }
    public String getHandledate() {
        return this.handledate;
    }
    public void setHandledate(String handledate) {
        this.handledate = handledate;
    }
    public String getAddress() {
        return this.address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
    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 int getWkid() {
        return this.wkid;
    }
    public void setWkid(int wkid) {
        this.wkid = wkid;
    }
    public double getScale() {
        return this.scale;
    }
    public void setScale(double scale) {
        this.scale = scale;
    }
    public int getStatus() {
        return this.status;
    }
    public void setStatus(int status) {
        this.status = status;
    }
    public int getCommit_status() {
        return this.commit_status;
    }
    public void setCommit_status(int commit_status) {
        this.commit_status = commit_status;
    }
    public String getFilepath() {
        return this.filepath;
    }
    public void setFilepath(String filepath) {
        this.filepath = filepath;
    }
    public String getFileid() {
        return this.fileid;
    }
    public void setFileid(String fileid) {
        this.fileid = fileid;
    }
    public String getUserid() {
        return this.userid;
    }
    public void setUserid(String userid) {
        this.userid = userid;
    }
}
