feature: consultant registration

This commit is contained in:
mso7nueh
2024-10-14 15:07:07 +03:00
parent 1462334155
commit 78be72372c
12 changed files with 244 additions and 143 deletions

View File

@@ -16,6 +16,7 @@ class ProfileModel with _$ProfileModel {
@JsonKey(name: "is_public_profile") required bool isPublicProfile,
@JsonKey(name: "slug") required String slug,
@JsonKey(name: "profile_photo_url") required String profilePhotoUrl,
required String role,
}) = _ProfileModel;
factory ProfileModel.fromJson(Map<String, dynamic> json) => _$ProfileModelFromJson(json);

View File

@@ -38,6 +38,7 @@ mixin _$ProfileModel {
String get slug => throw _privateConstructorUsedError;
@JsonKey(name: "profile_photo_url")
String get profilePhotoUrl => throw _privateConstructorUsedError;
String get role => throw _privateConstructorUsedError;
/// Serializes this ProfileModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@@ -64,7 +65,8 @@ abstract class $ProfileModelCopyWith<$Res> {
@JsonKey(name: "updated_at") DateTime? updatedAt,
@JsonKey(name: "is_public_profile") bool isPublicProfile,
@JsonKey(name: "slug") String slug,
@JsonKey(name: "profile_photo_url") String profilePhotoUrl});
@JsonKey(name: "profile_photo_url") String profilePhotoUrl,
String role});
}
/// @nodoc
@@ -91,6 +93,7 @@ class _$ProfileModelCopyWithImpl<$Res, $Val extends ProfileModel>
Object? isPublicProfile = null,
Object? slug = null,
Object? profilePhotoUrl = null,
Object? role = null,
}) {
return _then(_value.copyWith(
id: null == id
@@ -129,6 +132,10 @@ class _$ProfileModelCopyWithImpl<$Res, $Val extends ProfileModel>
? _value.profilePhotoUrl
: profilePhotoUrl // ignore: cast_nullable_to_non_nullable
as String,
role: null == role
? _value.role
: role // ignore: cast_nullable_to_non_nullable
as String,
) as $Val);
}
}
@@ -150,7 +157,8 @@ abstract class _$$ProfileModelImplCopyWith<$Res>
@JsonKey(name: "updated_at") DateTime? updatedAt,
@JsonKey(name: "is_public_profile") bool isPublicProfile,
@JsonKey(name: "slug") String slug,
@JsonKey(name: "profile_photo_url") String profilePhotoUrl});
@JsonKey(name: "profile_photo_url") String profilePhotoUrl,
String role});
}
/// @nodoc
@@ -175,6 +183,7 @@ class __$$ProfileModelImplCopyWithImpl<$Res>
Object? isPublicProfile = null,
Object? slug = null,
Object? profilePhotoUrl = null,
Object? role = null,
}) {
return _then(_$ProfileModelImpl(
id: null == id
@@ -213,6 +222,10 @@ class __$$ProfileModelImplCopyWithImpl<$Res>
? _value.profilePhotoUrl
: profilePhotoUrl // ignore: cast_nullable_to_non_nullable
as String,
role: null == role
? _value.role
: role // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
@@ -229,7 +242,8 @@ class _$ProfileModelImpl implements _ProfileModel {
@JsonKey(name: "updated_at") this.updatedAt,
@JsonKey(name: "is_public_profile") required this.isPublicProfile,
@JsonKey(name: "slug") required this.slug,
@JsonKey(name: "profile_photo_url") required this.profilePhotoUrl});
@JsonKey(name: "profile_photo_url") required this.profilePhotoUrl,
required this.role});
factory _$ProfileModelImpl.fromJson(Map<String, dynamic> json) =>
_$$ProfileModelImplFromJson(json);
@@ -261,10 +275,12 @@ class _$ProfileModelImpl implements _ProfileModel {
@override
@JsonKey(name: "profile_photo_url")
final String profilePhotoUrl;
@override
final String role;
@override
String toString() {
return 'ProfileModel(id: $id, name: $name, email: $email, emailVerifiedAt: $emailVerifiedAt, createdAt: $createdAt, updatedAt: $updatedAt, isPublicProfile: $isPublicProfile, slug: $slug, profilePhotoUrl: $profilePhotoUrl)';
return 'ProfileModel(id: $id, name: $name, email: $email, emailVerifiedAt: $emailVerifiedAt, createdAt: $createdAt, updatedAt: $updatedAt, isPublicProfile: $isPublicProfile, slug: $slug, profilePhotoUrl: $profilePhotoUrl, role: $role)';
}
@override
@@ -285,13 +301,14 @@ class _$ProfileModelImpl implements _ProfileModel {
other.isPublicProfile == isPublicProfile) &&
(identical(other.slug, slug) || other.slug == slug) &&
(identical(other.profilePhotoUrl, profilePhotoUrl) ||
other.profilePhotoUrl == profilePhotoUrl));
other.profilePhotoUrl == profilePhotoUrl) &&
(identical(other.role, role) || other.role == role));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, id, name, email, emailVerifiedAt,
createdAt, updatedAt, isPublicProfile, slug, profilePhotoUrl);
createdAt, updatedAt, isPublicProfile, slug, profilePhotoUrl, role);
/// Create a copy of ProfileModel
/// with the given fields replaced by the non-null parameter values.
@@ -319,8 +336,8 @@ abstract class _ProfileModel implements ProfileModel {
@JsonKey(name: "updated_at") final DateTime? updatedAt,
@JsonKey(name: "is_public_profile") required final bool isPublicProfile,
@JsonKey(name: "slug") required final String slug,
@JsonKey(name: "profile_photo_url")
required final String profilePhotoUrl}) = _$ProfileModelImpl;
@JsonKey(name: "profile_photo_url") required final String profilePhotoUrl,
required final String role}) = _$ProfileModelImpl;
factory _ProfileModel.fromJson(Map<String, dynamic> json) =
_$ProfileModelImpl.fromJson;
@@ -352,6 +369,8 @@ abstract class _ProfileModel implements ProfileModel {
@override
@JsonKey(name: "profile_photo_url")
String get profilePhotoUrl;
@override
String get role;
/// Create a copy of ProfileModel
/// with the given fields replaced by the non-null parameter values.

View File

@@ -23,6 +23,7 @@ _$ProfileModelImpl _$$ProfileModelImplFromJson(Map<String, dynamic> json) =>
isPublicProfile: json['is_public_profile'] as bool,
slug: json['slug'] as String,
profilePhotoUrl: json['profile_photo_url'] as String,
role: json['role'] as String,
);
Map<String, dynamic> _$$ProfileModelImplToJson(_$ProfileModelImpl instance) =>
@@ -36,6 +37,7 @@ Map<String, dynamic> _$$ProfileModelImplToJson(_$ProfileModelImpl instance) =>
'is_public_profile': instance.isPublicProfile,
'slug': instance.slug,
'profile_photo_url': instance.profilePhotoUrl,
'role': instance.role,
};
_$ProfileDetailsModelImpl _$$ProfileDetailsModelImplFromJson(