import 'package:equatable/equatable.dart';

abstract class LoginEvent extends Equatable {
  const LoginEvent();

  @override
  List<Object> get props => [];
}

/// 初始化
class LoginInitEvent extends LoginEvent {}

/// 第三方登录: 淘宝登录
class LoginThirdAliEvent extends LoginEvent {
  // 用户昵称
  final String nick;

  // 头像地址
  final String avatarUrl;
  final String openId;
  final String openSid;
  final String topAccessToken;
  final String topAuthCode;

  LoginThirdAliEvent({this.nick, this.avatarUrl, this.openId, this.openSid, this.topAccessToken, this.topAuthCode});

  @override
  List<Object> get props => [this.nick, this.avatarUrl, this.openId, this.openSid, this.topAccessToken, this.topAuthCode];
}

/// 第三方登录：苹果登录
class LoginThirdAppleEvent extends LoginEvent {}

/// 第三方登录：微信登录
class LoginThirdWeChatEvent extends LoginEvent {}

/// 第三方登录：QQ登录
class LoginThirdQQEvent extends LoginEvent {}
