package com.sheep.gamegroup.model.entity;

import java.io.Serializable;

/**
 * 已接受任务
 * Created by ljy on 2018/3/20.
 */

public class TaskAcceptedEty implements Serializable{
    private String create_time;// 0,
    private String device_id;// "string",
    private int id;// 0,
    private int release_task_id;// 0,
    private String remarks;// "string",
    private String screenshots;// "string",
    private int cash_task;// 1.现金任务 2福利任务
    private int status =1;// 0,--------1,已接受任务 2,正在进行中,3完成任务,4放弃任务,5任务失败,6审核失败,7提交审核,8任务已下线,9至少完成了一个任务了
    private String uid;// 0,
    private String update_time;// 0
    private int lower_num;// 任务下线后提交的次数

    private long end_time;

    private Release_task release_task;
    private int child_task_id;//0 1开始子任务  2完成第二个子任务
    private int task_child_id;
    private int allowSubmit;//失败或者下线后，是否可以再次提交截图 2 不可以 1 可以
    //用于自定义字段，如自定义手机号
    private String unique_identification;//UniqueIdentification string       `orm:"column(unique_identification);null" description:"唯一标识" json:"unique_identification"`

    public int getChild_task_id() {
        return child_task_id;
    }

    public void setChild_task_id(int child_task_id) {
        this.child_task_id = child_task_id;
    }

    public long getEnd_time() {
        return end_time;
    }

    public void setEnd_time(long end_time) {
        this.end_time = end_time;
    }

    public String getCreate_time() {
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public String getDevice_id() {
        return device_id;
    }

    public void setDevice_id(String device_id) {
        this.device_id = device_id;
    }

    public int getId() {
        return id;
    }

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

    public int getRelease_task_id() {
        return release_task_id;
    }

    public void setRelease_task_id(int release_task_id) {
        this.release_task_id = release_task_id;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getScreenshots() {
        return screenshots;
    }

    public void setScreenshots(String screenshots) {
        this.screenshots = screenshots;
    }

    public int getStatus() {
        return status;
    }

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

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(String update_time) {
        this.update_time = update_time;
    }

    public Release_task getRelease_task() {
        return release_task;
    }

    public void setRelease_task(Release_task release_task) {
        this.release_task = release_task;
    }

    public int getLower_num() {
        return lower_num;
    }

    public void setLower_num(int lower_num) {
        this.lower_num = lower_num;
    }

    public int getCash_task() {
        return cash_task;
    }

    public void setCash_task(int cash_task) {
        this.cash_task = cash_task;
    }

    public int getTask_child_id() {
        return task_child_id;
    }

    public void setTask_child_id(int task_child_id) {
        this.task_child_id = task_child_id;
    }

    public int getAllowSubmit() {
        return allowSubmit;
    }

    public void setAllowSubmit(int allowSubmit) {
        this.allowSubmit = allowSubmit;
    }


    public String getUnique_identification() {
        return unique_identification;
    }

    public void setUnique_identification(String unique_identification) {
        this.unique_identification = unique_identification;
    }



    @Override
    public boolean equals(Object obj) {
        return obj instanceof TaskAcceptedEty &&
                (((TaskAcceptedEty) obj).task_child_id == task_child_id) && (((TaskAcceptedEty) obj).id == id  || ( release_task != null && release_task.equals(((TaskAcceptedEty) obj).getRelease_task())));
    }


    /**
     * 获取任务标签：现金或者福利
     * 1.现金任务 2福利任务
     * @return
     */
    public String getCashText(){
        switch (cash_task){
            case 1:
                return "现金";
            case 2:
            default:
                return "福利";
        }
    }
    public boolean isIs_running() {
        return status == 1 || status == 2;
    }

    public static final int IS_SUCCESSION_ALL = 3;//所有
    public static final int SHOW_GAME_TASK_NO = 0;//不获取游戏任务
    public static final int SHOW_GAME_TASK_YES = 1;//要获取游戏任务
    //status  1,已接受任务 2,正在进行中,3完成任务,4放弃任务,5任务失败,6审核失败,7提交审核,8任务已下线,9至少完成了一个任务了
    public static final int STATUS_ACCEPTED_TASK = 1;
    public static final int STATUS_RUNNING = 2;
    public static final int STATUS_FINISHED = 3;
    public static final int STATUS_GIVE_UP = 4;
    public static final int STATUS_TASK_FAIL = 5;
    public static final int STATUS_AUDIT_FAILURE = 6;
    public static final int STATUS_SUBMIT = 7;
    public static final int STATUS_OFF_LINE = 8;
    public static final int STATUS_AT_LEAST_COMPLETE_ONE = 9;
    //canSubmit 失败或者下线后，是否可以再次提交截图 2 不可以 1 可以
    public static final int ALLOW_SUBMIT_NO = 2;
    public static final int ALLOW_SUBMIT_YES = 1;

}
