package com.zcloud.fire.check.domain.model;

import com.jjb.saas.framework.domain.model.BaseE;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * web-domain
 *
 * @Author zhaokai
 * @Date 2025-12-12 11:10:58
 */
@Data
public class FireCheckRecordE extends BaseE {
    //主键
    private Long id;
    //业务主键id
    private String fireRecordId;
    //企业id
    private Long corpinfoId;
    //检查表id
    private String fireCheckId;
    //检查表名字
    private String fireCheckName;
    //检查表类型
    private String fireCheckType;
    //检查表类型名称
    private String fireCheckTypeName;
    //检查时间
    private LocalDateTime checkTime;
    //是否完成,0否1是
    private Integer finishedFlag;
    //检查周期开始时间
    private LocalDateTime periodStart;
    //检查周期结束时间
    private LocalDateTime periodEnd;
    //签字url
    private String signUrl;

    //乐观锁
    private Integer version;
    //创建人
    private Long createId;
    //创建人姓名
    private String createName;
    //创建时间
    private LocalDateTime createTime;
    //更新人
    private Long updateId;
    //修改人名称
    private String updateName;
    //更新时间
    private LocalDateTime updateTime;
    //描述
    private String remarks;
    //是否删除
    private String deleteEnum;
    //租户ID
    private Long tenantId;
    //机构ID
    private Long orgId;
    //环境
    private String env;

    public void initCheckRecord(FireCheckListE fireCheckListE) {
        this.fireCheckId = fireCheckListE.getFireCheckId();
        this.fireCheckName = fireCheckListE.getFireCheckName();
        fireCheckListE.getCheckRecordPeriod(fireCheckListE.getFireCheckType(), LocalDateTime.now());
        this.periodStart = fireCheckListE.getPeriodStart();
        this.periodEnd = fireCheckListE.getPeriodEnd();
        this.fireCheckType = fireCheckListE.getFireCheckType();
        this.fireCheckTypeName = fireCheckListE.getFireCheckTypeName();


    }
}

