import 'package:equatable/equatable.dart';
import 'package:flutter/cupertino.dart';

abstract class LoginAccountEvent extends Equatable {
  const LoginAccountEvent();

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

/// 初始化事件
class LoginAccountInitEvent extends LoginAccountEvent {}


/// 获取验证码
class LoginAccountGetVcodeEvent extends LoginAccountEvent{
  final String mobile;
  const LoginAccountGetVcodeEvent({@required this.mobile});
  @override
  List<Object> get props => [mobile];
}

/// 核对验证码
class LoginAccountCheckVcodeEvent extends LoginAccountEvent{
  /// 手机号码
  final String mobile;
  /// 验证码
  final String captcha;
  const LoginAccountCheckVcodeEvent({@required this.mobile, @required this.captcha});
  @override
  List<Object> get props => [this.mobile, this.captcha];
}

/// 登陆事件(密码登陆)
class LoginAccountTypePasswordEvent extends LoginAccountEvent{
  final String username;
  final String password;
  const LoginAccountTypePasswordEvent({@required this.username, @required this.password});
}

/// 登陆事件(验证码登陆)
class LoginAccountTypeVcodeEvent extends LoginAccountEvent{
  final String mobile;
  final String captcha;
  const LoginAccountTypeVcodeEvent({@required this.mobile, @required this.captcha});
  @override
  List<Object> get props => [this.mobile, this.captcha];
}