// ============================================================
// AuthSession — 登录会话实体（用户 + 双 Token）
// ============================================================

import 'auth_user.dart';

class AuthSession {
  final AuthUser user;
  final String accessToken;
  final String refreshToken;
  final int expiresIn;

  const AuthSession({
    required this.user,
    required this.accessToken,
    required this.refreshToken,
    required this.expiresIn,
  });

  AuthSession copyWith({
    AuthUser? user,
    String? accessToken,
    String? refreshToken,
    int? expiresIn,
  }) {
    return AuthSession(
      user: user ?? this.user,
      accessToken: accessToken ?? this.accessToken,
      refreshToken: refreshToken ?? this.refreshToken,
      expiresIn: expiresIn ?? this.expiresIn,
    );
  }
}
