package com.red.circle.other.infra.database.rds.service.team;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.red.circle.framework.mybatis.service.BaseService;
import com.red.circle.other.infra.database.rds.entity.team.AdminRechargeAgentRelation;

/**
 * 管理员充值代理关系Service.
 *
 * @author tf
 */
public interface AdminRechargeAgentRelationService extends BaseService<AdminRechargeAgentRelation> {

  /**
   * 根据用户ID查询关系.
   *
   * @param userId 充值代理用户ID
   * @return 关系实体
   */
  AdminRechargeAgentRelation getByUserId(Long userId);

  /**
   * 检查用户是否是充值代理.
   *
   * @param userId 用户ID
   * @return true-是充值代理, false-不是
   */
  boolean checkRechargeAgent(Long userId);

  /**
   * 添加关系.
   *
   * @param relation 关系实体
   */
  void add(AdminRechargeAgentRelation relation);

  /**
   * 分页查询管理员下的充值代理.
   *
   * @param adminUserId 管理员用户ID
   * @param page 分页对象
   * @return 分页结果
   */
  IPage<AdminRechargeAgentRelation> pageRechargeAgentByAdmin(Long adminUserId, Page<AdminRechargeAgentRelation> page);

}
