// ignore_for_file: invalid_annotation_target

import 'package:freezed_annotation/freezed_annotation.dart';

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

@freezed
abstract class User with _$User {
  const factory User({
    required String? id,
    @JsonKey(name: 'full_name') required String? fullName,
    required String? username,
    required String? email,
    required String? role,
    required String? status,
    required String? department,
    required String? position,
    required String? phone,
    @JsonKey(name: 'profile_image') required String? profileImage,
    @JsonKey(name: 'is_verified') required bool? isVerified,
    @JsonKey(name: 'last_login_at') required int? lastLoginAt,
    @JsonKey(name: 'created_at') required int? createdAt,
    @JsonKey(name: 'updated_at') required int? updatedAt,
  }) = _User;

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