package com.friday.custody.service.tenantService;

import com.friday.custody.dto.TenantEscrowAuthorizationInfoDto;
import com.friday.custody.dto.TenantInfoDto;
import com.friday.custody.req.TenantEscrowAuthorizationInfoReq;
import com.friday.custody.req.TenantInfoReq;
import com.friday.custody.utils.R;

import java.util.List;

public interface TenantService {

    /**
     * 新增租户
     *
     * @param dto
     * @return
     */
    R addTenant(TenantInfoDto dto);

    /**
     * 查询用户
     * @param dto
     * @return
     */
    R<TenantInfoDto> queryTenant(TenantInfoDto dto);

    R saveEscrowAuthorization(String tenantName, String accountKey, TenantEscrowAuthorizationInfoDto vo);

    R queryAuthorization(String tenantName, String accountKey);

    R<List<TenantEscrowAuthorizationInfoDto>> queryAuthorizations();

    /**
     * 批量新增租户
     * @param tenantInfoReqs
     * @return
     */
    R addTenants(String tenantName, List<TenantInfoReq> tenantInfoReqs);

    /**
     * 批量授权
     * @param escrowAuthorizationInfoReqs
     * @return
     */

    R addEscrowAuthorizations(String tenantName, TenantInfoDto tenantInfoDto, List<TenantEscrowAuthorizationInfoReq> escrowAuthorizationInfoReqs);
}
