import '../domain/user_entity.dart';

class AuthModel extends UserEntity {
  AuthModel({required super.token, required super.role});

  factory AuthModel.fromJson(Map<String, dynamic> json) {
    // Ngambil dari json['data'] karena API Spring Boot lu sekarang pake ApiResponse
    return AuthModel(
      token: json['data']['token'],
      role: json['data']['role'],
    );
  }
}