package com.zt.plat.module.qms.framework.datapermission;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.HashSet;
import java.util.Set;

@Schema(description = "QMS的数据权限 Response DTO")
@Data
public class QMSDataPermissionDTO {

    @Schema(description = "是否可查看全部数据", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
    private Boolean all;

    @Schema(description = "是否可查看自己的数据", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
    private Boolean self;

    @Schema(description = "可查看的部门编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1, 3]")
    private Set<Long> deptIds;

    @Schema(description = "可查看的公司编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1, 3]")
    private Long companyId;

    public QMSDataPermissionDTO() {
        this.all = false;
        this.self = false;
        this.deptIds = new HashSet<>();
        this.companyId = 0L;
    }

}
