import 'package:freezed_annotation/freezed_annotation.dart';

part 'user.freezed.dart';
// part 'user.g.dart';

@freezed
class User with _$User {
  const factory User({
    required String id,
    required String name,
    String? avatarUrl,
    String? role, // 'admin', 'member'
    bool? isOnline,
    DateTime? lastSeen,
  }) = _User;

  // factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
}
