import 'package:freezed_annotation/freezed_annotation.dart';

part 'user_profile.freezed.dart';
part 'user_profile.g.dart';

@freezed
abstract class UserProfile with _$UserProfile {
  const factory UserProfile({
    List<String>? role,
    String? city,
    String? province,
    String? key,
    String? userGateWayId,
    dynamic userDjangoIdForeignKey,
    dynamic provinceIdForeignKey,
    dynamic cityIdForeignKey,
    dynamic systemUserProfileIdKey,
    String? fullname,
    String? firstName,
    String? lastName,
    String? nationalCode,
    String? nationalCodeImage,
    String? nationalId,
    String? mobile,
    String? birthday,
    String? image,
    String? password,
    bool? active,
    UserState? state,
    int? baseOrder,
    int? cityNumber,
    String? cityName,
    int? provinceNumber,
    String? provinceName,
    String? unitName,
    String? unitNationalId,
    String? unitRegistrationNumber,
    String? unitEconomicalNumber,
    String? unitProvince,
    String? unitCity,
    String? unitPostalCode,
    String? unitAddress,
    String? personType,
    String? type,
  }) = _UserProfile;

  factory UserProfile.fromJson(Map<String, dynamic> json) => _$UserProfileFromJson(json);
}

@freezed
abstract class UserState with _$UserState {
  const factory UserState({
    String? city,
    String? image,
    String? mobile,
    String? birthday,
    String? province,
    String? lastName,
    String? firstName,
    String? nationalId,
    String? nationalCode,
  }) = _UserState;

  factory UserState.fromJson(Map<String, dynamic> json) => _$UserStateFromJson(json);
}
