package com.hssx.pcbms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author 吴涛涛
 * @since 2019-11-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class TaskDynamic extends Model<TaskDynamic> {

    private static final long serialVersionUID=1L;

    /**
     * 任务动态表主键
     */
    //AUTO 数据库ID自增
    //INPUT 用户输入ID
    //ID_WORKER 全局唯一ID，Long类型的主键
    //ID_WORKER_STR 字符串全局唯一ID
    //UUID 全局唯一ID，UUID类型的主键
    //NONE 该类型为未设置主键类型
    @TableId(value = "id",type = IdType.ID_WORKER_STR )
    private String id;

    /**
     * 任务id
     */
    @TableField("task_id")
    private String taskId;

    /**
     * 时间
     */
    @TableField("indate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime indate;

    /**
     * 内容
     */
    @TableField("content")
    private String content;

    /**
     * 状态描述
     */
    @TableField("state_content")
    private String stateContent;

    /**
     * 任务状态
     */
    @TableField("task_state")
    private Integer taskState;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
