package com.bcxin.tenant.domain.repositories.composites;

import lombok.Getter;

import java.util.Collection;

public class BatchImportDepartResult {
    private final String businessId;
    private final Collection<DepartItem> departItems;

    public BatchImportDepartResult(String businessId, Collection<DepartItem> departItems) {
        this.businessId = businessId;
        this.departItems = departItems;
    }

    public static BatchImportDepartResult create(String businessId, Collection<DepartItem> departItems) {
        return new BatchImportDepartResult(businessId, departItems);
    }

    @Getter
    public static class DepartItem
    {
        private final String name;
        private final boolean isSuccess;
        private final String result;

        public DepartItem(String name, boolean isSuccess, String result) {
            this.name = name;
            this.isSuccess = isSuccess;
            this.result = result;
        }
    }
}
