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.time.LocalDateTime;

/**
 * 执行反馈领域模型
 * <p>
 * 对应数据库表safety_accountability_feedback，
 * 包含反馈内容、反馈周期标识、反馈人信息等字段。
 */
@Data
public class FeedbackE extends BaseE {
    private Long id;
    private String feedbackId;
    private String taskDetailId;
    private String taskExecutionId;
    private String taskListId;
    private String taskIssueId;
    private LocalDateTime feedbackTime;
    private LocalDateTime feedbackPeriodStartTime;
    private LocalDateTime feedbackPeriodEndTime;
    private String feedbackPeriodFlag;
    private String feedbackContent;
    private Long feedbackUserId;
    private Long feedbackCorpId;
    private Long feedbackDepartmentId;

    public void init() {
        if (ObjectUtils.isEmpty(this.feedbackId)) {
            setFeedbackId(Tools.get32UUID());
        }
    }
}
