package com.codvision.auth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.codvision.auth.entity.UserOrgRole;
import com.codvision.auth.entity.vo.UserAssociatedInfoVO;
import com.codvision.auth.entity.vo.UserOrgRoleVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 组织用户关联信息 Mapper 接口
 * </p>
 *
 * @author lingee
 * @since 2023-11-10
 */
public interface UserOrgRoleMapper extends BaseMapper<UserOrgRole> {


    /**
     * 获取用户最近的组织角色
     *
     * @param uid 用户id
     * @return 组织角色信息
     */
    UserOrgRole getLatestInfo(@Param("uid") Integer uid);

    /**
     * 获取用户最近的组织角色详情
     *
     * @param uid 用户id
     * @return 组织角色信息
     */
    UserOrgRoleVO getLatestInfoDetail(@Param("uid") Integer uid);

    /**
     * 获取用户组织角色列表
     *
     * @param uid 用户id
     * @return 组织角色列表
     */
    List<UserOrgRoleVO> getUserOrgRoleList(@Param("uid") Integer uid);

    /**
     * 获取用户关联信息
     *
     * @param uid 用户id
     * @return 用户关联信息列表
     */
    List<UserAssociatedInfoVO> getAssociatedInfos(@Param("uid") Integer uid);
}
