/// Domain entity representing an authenticated user.
class AuthUserEntity {
  final String id;
  final String email;
  final String name;
  final List<String> roles;
  final String? tenantId;
  final String? tenantName;

  const AuthUserEntity({
    required this.id,
    required this.email,
    required this.name,
    required this.roles,
    this.tenantId,
    this.tenantName,
  });

  bool get isAdmin => roles.contains('admin');
  bool get isOperator => roles.contains('operator') || isAdmin;
}
