using QYZH.InteractiveMagazine.Models.Entity;
using QYZH.InteractiveMagazine.Models.WeChat;
namespace QYZH.InteractiveMagazine.IService;
///
/// 微信小程序认证服务
///
public interface IWeChatAuthService : IBaseService
{
///
/// 微信小程序登录(首次仅创建 WxUser,不自动创建 User)
///
Task LoginAsync(WeChatLoginInput input);
///
/// 微信小程序快捷登录(通过 OpenId 直接登录)
///
Task QuickLoginAsync(WeChatQuickLoginInput input);
///
/// 切换用户(同一 WxUser 下切换 User 身份,重新生成 Token)
///
/// 当前 WxUser.Id(来自 JWT)
/// 当前激活 Users.Id(来自 JWT,用于清除旧 Redis Token)
/// 切换目标用户参数
Task SwitchUserAsync(long wxUserId, long currentUserId, WeChatSwitchUserInput input);
///
/// 获取当前 WxUser 下所有用户列表
///
/// 当前登录的 WxUser.Id(来自 JWT)
/// 用户列表
Task> GetUsersAsync(long wxUserId);
///
/// 在当前 WxUser 下新增用户(子用户/角色)
///
/// 当前登录的 WxUser.Id(来自 JWT)
/// 新增用户参数
/// 新创建的用户信息
Task CreateUserAsync(long wxUserId, CreateChildUserInput input);
///
/// 修改家长名字(WxUser.Name)
///
/// 当前登录的 WxUser.Id(来自 JWT)
/// 修改名字参数
/// 更新后的微信用户信息
Task UpdateWxUserNameAsync(long wxUserId, UpdateWxUserNameInput input);
}