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

import com.alibaba.cola.exception.BizException;
import com.jjb.saas.framework.domain.model.BaseE;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * web-domain
 *
 * @Author zhaokai
 * @Date 2025-11-26 10:37:09
 */
@Data
public class FireRegionE extends BaseE {
    //主键
    private Long id;
    //业务主键id
    private String fireRegionId;
    //企业id
    private Long corpinfoId;
    //消防区域名称
    private String fireRegionName;
    //编码
    private String fireRegionCode;
    //部门id
    private Long departmentId;
    //0启用,1禁用
    private Integer state;

    //乐观锁
    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 static void checkFireRegion(String fireRegionName, long count) {
        if (count > 0) {
            throw new BizException(fireRegionName + "下有点位,不能删除");
        }
    }
}

