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

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

/**
 * 任务详情领域模型
 * <p>
 * 对应数据库表safety_accountability_task_detail，
 * 包含任务的执行内容、反馈周期、状态、评分等字段。
 */
@Data
public class TaskDetailE extends BaseE {
    private Long id;
    private String taskDetailId;
    private String taskListId;
    private String executeContent;
    private Integer feedbackCycleType;
    private Integer taskStatus;
    private Integer feedbackStatus;
    private BigDecimal taskScore;
    private BigDecimal taskRating;
    private LocalDateTime ratingTime;
    private Long ratingDepartmentId;
    private Long ratingUserId;

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