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;

/**
 * 安全责任清单领域模型（纯模板定义）
 * <p>
 * 对应数据库表safety_accountability_task_list，
 * 仅包含清单模板定义字段，执行相关字段已迁移至TaskListIssueE。
 */
@Data
public class TaskListE extends BaseE {
    private Long id;
    private String taskListId;
    private String taskListName;
    private Integer taskLevel;
    private String responsibilityPost;
    private Integer switchFlag;
    private Integer status;
    private Long createCorpId;
    private Long createDepartmentId;
    private Long createUserId;

    public void init() {
        if (ObjectUtils.isEmpty(this.taskListId)) {
            setTaskListId(Tools.get32UUID());
        }
    }
}
