package com.cpop.oam.business.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;

/**
 * 任务审核对象
 * @author DB
 * @since 2023-12-01 10:36:14
 * @version 1.0.0
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "TaskAudit对象", description = "任务审核对象")
public class TaskAuditCommentsBo {

    /**
     * 主键
     */
    @NotBlank(message = "主键不能为空")
    @ApiModelProperty(value = "主键", required = true)
    private String id;

    /**
     * 是否通过
     */
    @NotNull(message = "是否通过不能为空")
    @ApiModelProperty(value = "是否通过", required = true)
    private Boolean isPass;

    /**
     * 任务评级(0:A;1:B;2:C;3:D;4:E)
     */
    @ApiModelProperty("任务评级")
    private String taskRating;

    /**
     * 任务权重
     */
    @ApiModelProperty("任务权重(任务绩点)")
    private Integer taskWeight;

    public void setTaskWeight(String taskWeight) {
        this.taskWeight = Integer.parseInt(taskWeight.split(",")[0]);
    }

    /**
     * 备注(不通过时可以写入备注)
     */
    @ApiModelProperty("备注(不通过时可以写入备注)")
    private String remark;

}
