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

import com.jjb.saas.framework.domain.model.BaseE;
import com.zcloud.fire.check.domain.enums.HiddenCheckTypeEnum;
import com.zcloud.gbscommon.zcloudhidden.request.HiddenAddCmd;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * web-domain
 *
 * @Author zhaokai
 * @Date 2025-12-12 11:11:15
 */
@Data
public class FireCheckRecordHiddenE extends BaseE {
    //主键
    private Long id;
    //业务主键id
    private String fireRecordHiddenId;
    //企业id
    private Long corpinfoId;
    //检查表id
    private String fireCheckId;

    //消防区域主键id
    private String fireRegionId;
    //消防点位id
    private String firePointId;
    //消防器材id
    private String fireDeviceId;

    //检查记录表id
    private String fireRecordId;
    //检查记录点位表id
    private String fireRecordPointId;
    //检查记录设备表id
    private String fireRecordDeviceId;
    //隐患id
    private String hiddenId;
    //隐患类型,检查项隐患1,还是其他隐患2
    private Integer hiddenCheckType;
    //隐患描述
    private String hiddenDesc;
    //乐观锁
    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 initFireCheckRecordHidden(FireCheckRecordDeviceE fireCheckRecordDeviceE, String hiddenId, String hiddenDesc) {
        this.fireCheckId = fireCheckRecordDeviceE.getFireCheckId();
        this.fireRecordId = fireCheckRecordDeviceE.getFireRecordId();
        this.fireRecordPointId = fireCheckRecordDeviceE.getFireRecordPointId();
        this.fireRecordDeviceId = fireCheckRecordDeviceE.getFireRecordDeviceId();
        this.hiddenId = hiddenId;
        this.hiddenDesc = hiddenDesc;
        this.hiddenCheckType = HiddenCheckTypeEnum.CHECK_ITEM_HIDDEN.getCode();
        this.fireRegionId = fireCheckRecordDeviceE.getFireRegionId();
        this.firePointId = fireCheckRecordDeviceE.getFirePointId();
        this.fireDeviceId = fireCheckRecordDeviceE.getFireDeviceId();
    }

    public void initOtherFireCheckRecordHidden(FireCheckRecordE fireCheckRecordE, HiddenAddCmd hiddenAddCmd) {
        this.fireCheckId = fireCheckRecordE.getFireCheckId();
        this.fireRecordId = fireCheckRecordE.getFireRecordId();
        this.hiddenId = hiddenAddCmd.getHiddenId();
        this.hiddenDesc = hiddenAddCmd.getHiddenDesc();
        this.hiddenCheckType = HiddenCheckTypeEnum.OTHER_HIDDEN.getCode();
    }
}

