package com.zhongshu.card.client.model.org;

import com.zhongshu.card.client.type.ProjectType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author TRX
 * @date 2024/5/31
 */
@Data
public class ProjectOrgModel extends OrganizationModel {

    @Schema(description = "项目类型")
    private ProjectType dataAuthType;

    @Schema(description = "学校数量")
    private Long schoolNumber = 0L;

    @Schema(description = "项目人数")
    private Long userNumber = 0L;

    @Schema(description = "设备总数")
    private Long deviceNumber = 0L;

    @Schema(description = "在线设备数量")
    private Long onLineNumber = 0L;

    @Schema(description = "管理员userId")
    private List<String> managerUserIds = new ArrayList<>();

    @Schema(description = "负责任信息列表")
    private List<UserCountSimpleModel> managerUserList = new ArrayList<>();

    @Schema(description = "是否完成 项目管理的微信配置")
    private Boolean isFinishWeChat = Boolean.FALSE;

    @Schema(description = "是否完成项目管理的物联网设置")
    private Boolean isFinishIot = Boolean.FALSE;

    @Schema(description = "是否完成通用设置")
    private Boolean isFinishCommon = Boolean.FALSE;

    @Schema(description = "是否完成支付配置")
    private Boolean isFinishPay = Boolean.FALSE;

    @Schema(description = "是否完成所有的配置")
    private Boolean isFinishAll = Boolean.FALSE;

    public Boolean getIsFinishAll() {
        if (isFinishWeChat != null && isFinishWeChat
                && isFinishIot != null && isFinishIot
                && isFinishCommon != null && isFinishCommon
                && isFinishPay != null && isFinishPay) {
            return Boolean.TRUE;
        }
        return Boolean.FALSE;
    }

}
