package com.cpop.oam.business.bo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;


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

    /**
     * 主键
     */
    @NotBlank(message = "主键不能为空")
    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
    private String id;

    /**
     * 是否通过
     */
    @NotNull(message = "是否通过不能为空")
    @Schema(description = "是否通过", requiredMode = Schema.RequiredMode.REQUIRED)
    private Boolean isPass;

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

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

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

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

}
