package com.bcxin.tenant.open.domains.dtos;

import lombok.Getter;

import java.io.Serializable;
import java.util.Collection;

@Getter
public class ProprietorOrgWrapContentDTO implements Serializable {
    private final String key;
    private final Collection<ProprietorOrgContentDTO> contents;

    public ProprietorOrgWrapContentDTO(String key, Collection<ProprietorOrgContentDTO> contents) {
        this.key = key;
        this.contents = contents;
    }

    public static ProprietorOrgWrapContentDTO create(String key,Collection<ProprietorOrgContentDTO> contents) {
        return new ProprietorOrgWrapContentDTO(key, contents);
    }

    public static class ProprietorOrgContentDTO implements Serializable {
        private final String id;
        private final String name;
        private final String superviseDepartId;
        private final String superviseDepartName;

        public ProprietorOrgContentDTO(String id, String name, String superviseDepartId, String superviseDepartName) {
            this.id = id;
            this.name = name;
            this.superviseDepartId = superviseDepartId;
            this.superviseDepartName = superviseDepartName;
        }

        public static ProprietorOrgContentDTO create(String id, String name, String superviseDepartId, String superviseDepartName) {
            return new ProprietorOrgContentDTO(id, name, superviseDepartId, superviseDepartName);
        }
    }
}
