package com.zcloud.safetyDutyList.domain.model.tasklist;

import com.jjb.saas.framework.domain.model.BaseE;
import com.zcloud.gbscommon.utils.Tools;
import com.zcloud.gbscommon.utils.UuidUtil;
import lombok.Data;
import org.springframework.util.ObjectUtils;
import java.math.BigDecimal;

/**
 * 任务详情领域模型（纯模板定义）
 * <p>
 * 对应数据库表safety_accountability_task_detail，
 * 仅包含任务模板定义字段，执行相关字段已迁移至TaskExecutionE。
 */
@Data
public class TaskDetailE extends BaseE {
    private Long id;
    private String taskDetailId;
    private String taskListId;
    private String executeContent;
    private Integer feedbackCycleType;
    private BigDecimal taskScore;
    private Integer taskStatus;

    public void init() {
        if (ObjectUtils.isEmpty(this.taskDetailId)) {
            setTaskDetailId(UuidUtil.get32UUID());
        }
    }
}
