package com.bcxin.tenant.open.domains.services.commands;

import com.bcxin.tenant.open.infrastructures.commands.CommandAbstract;
import lombok.Getter;

import java.util.Collection;

@Getter
public class InviteRoomUserCommand extends  CommandAbstract{
    private final long roomId;

    private final Collection<InviteUserCommandItem> roomUsers;

    public InviteRoomUserCommand(long roomId,Collection<InviteUserCommandItem> roomUsers) {
        this.roomUsers = roomUsers;
        this.roomId = roomId;
    }

    public static InviteRoomUserCommand create(long roomId, Collection<InviteUserCommandItem> roomUsers) {
        return new InviteRoomUserCommand(roomId,roomUsers);
    }

    @Getter
    public static class InviteUserCommandItem extends CommandAbstract {
        private final String employeeId;
        private final String organizationId;
        private final String tencentUserId;
        private final String securityStationId;
        private final String superviseDepartId;


        public InviteUserCommandItem(String employeeId, String organizationId,
                                     String tencentUserId, String securityStationId,
                                     String superviseDepartId) {
            this.employeeId = employeeId;
            this.organizationId = organizationId;
            this.tencentUserId = tencentUserId;
            this.securityStationId = securityStationId;
            this.superviseDepartId = superviseDepartId;
        }

        public static InviteUserCommandItem create(String employeeId, String organizationId,
                                                   String tencentUserId, String securityStationId,
                                                   String superviseDepartId) {
            return new InviteUserCommandItem(employeeId, organizationId, tencentUserId, securityStationId, superviseDepartId);
        }
    }
}
