package com.bcxin.api.interfaces.tenants.responses;

import com.bcxin.Infrastructures.enums.MasterSlaveType;
import lombok.Getter;

import java.io.Serializable;
import java.util.Map;

@Getter
public class UserOrganBasicGetResponse implements Serializable {
    private final static long serialVersionUID = 22L;
    private final String organizationId;
    private final String employeeId;
    private final String name;
    private final MasterSlaveType masterSlaveType;
    private final Map<String,Object> additional;
    private final boolean isDomainAdmin;
    private boolean isDepartAdmin = false;
    private String areaCode;

    private final String orgName;

    public UserOrganBasicGetResponse(String organizationId,String orgName, String employeeId, String name,
                                     MasterSlaveType masterSlaveType, Map<String, Object> additional, boolean isDomainAdmin,
                                     boolean isDepartAdmin,
                                     String areaCode) {
        this.organizationId = organizationId;
        this.employeeId = employeeId;
        this.orgName = orgName;
        this.name = name;
        this.masterSlaveType = masterSlaveType;
        this.additional = additional;
        this.isDomainAdmin = isDomainAdmin;
        this.isDepartAdmin = isDepartAdmin;
        this.areaCode = areaCode;
    }

    public static UserOrganBasicGetResponse create(String organizationId,String orgName, String employeeId,String name,
                                                   MasterSlaveType masterSlaveType,Map<String,Object> additional, boolean isDomainAdmin,
                                                   boolean isDepartAdmin,
                                                   String areaCode
                                                   ) {
        return new UserOrganBasicGetResponse(organizationId,orgName, employeeId, name, masterSlaveType,additional, isDomainAdmin,
        isDepartAdmin,
        areaCode);
    }
}
