/*
 * Author: wangjian
 * 生成entity
 */
package com.tofly.stocks.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.tofly.utils.NullHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.ibatis.type.JdbcType;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.List;
import java.util.stream.Collectors;

import javax.validation.constraints.NotNull;


/**
 * 库存盘点任务表
 *
 * @author admin
 * @date Fri Nov 25 00:00:00 CST 2022
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "TF_STOCKS_CHECK_TASK", resultMap = "checkTaskMap")
@KeySequence("TF_STOCKS_CHECK_TASK")
@ApiModel
public class CheckTask extends Model<CheckTask> {
    private static final long serialVersionUID = 1L;

    /**
     * 盘点任务主键ID
     */
    @TableId(value = "ID", type = IdType.INPUT)
    @ApiModelProperty(value = "盘点任务主键ID")
    private Long id;
    /**
     * 盘点计划ID
     */
    @ApiModelProperty(value = "盘点计划ID",hidden = true)
    private Long checkPlanId;
    /**
     * 盘点任务用户ID
     */
    @ApiModelProperty(value = "盘点人员ID")
    private Long checkUserId;
    /**
     * 盘点任务时间
     */
    @ApiModelProperty(value = "盘点日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date checkTime;
    /**
     * 盘点任务备注
     */
    @ApiModelProperty(value = "盘点任务备注")
    @TableField(jdbcType = JdbcType.VARCHAR,updateStrategy = FieldStrategy.IGNORED,typeHandler = NullHandler.class)
    private String checkRemark;

    /**
     * 附件json
     */
    @ApiModelProperty(value = "附件json")
    @TableField(jdbcType = JdbcType.VARCHAR,updateStrategy = FieldStrategy.IGNORED,typeHandler = NullHandler.class)
    private String annex;


    /**
     * 盘点任务状态状态，1盘点中（待确认） 2、已确认
     */
    @ApiModelProperty(value = "盘点状态  1未盘点 2、已盘点")
    @NotNull(message = "盘点状态不能为空")
    private Integer checkStatus;


}
