forked from eatvio/eatvio_app
feat(diary): consultant comments
This commit is contained in:
@@ -12,7 +12,8 @@ class ChatRoomModel with _$ChatRoomModel {
|
||||
required String id,
|
||||
@JsonKey(name: 'chat_room_setting') required ChatRoomSettingsModel chatRoomSettings,
|
||||
required Users users,
|
||||
@JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan) required ChosenPlanModel? chosenPlan,
|
||||
@JsonKey(name: 'chosen_plan_id') required int? chosenPlanId,
|
||||
ChosenPlanModel? chosenPlan,
|
||||
}) = _ChatRoomModel;
|
||||
|
||||
factory ChatRoomModel.fromJson(Map<String, Object?> json) => _$ChatRoomModelFromJson(json);
|
||||
|
||||
@@ -25,7 +25,8 @@ mixin _$ChatRoomModel {
|
||||
ChatRoomSettingsModel get chatRoomSettings =>
|
||||
throw _privateConstructorUsedError;
|
||||
Users get users => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan)
|
||||
@JsonKey(name: 'chosen_plan_id')
|
||||
int? get chosenPlanId => throw _privateConstructorUsedError;
|
||||
ChosenPlanModel? get chosenPlan => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ChatRoomModel to a JSON map.
|
||||
@@ -49,7 +50,7 @@ abstract class $ChatRoomModelCopyWith<$Res> {
|
||||
@JsonKey(name: 'chat_room_setting')
|
||||
ChatRoomSettingsModel chatRoomSettings,
|
||||
Users users,
|
||||
@JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan)
|
||||
@JsonKey(name: 'chosen_plan_id') int? chosenPlanId,
|
||||
ChosenPlanModel? chosenPlan});
|
||||
|
||||
$ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings;
|
||||
@@ -75,6 +76,7 @@ class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel>
|
||||
Object? id = null,
|
||||
Object? chatRoomSettings = null,
|
||||
Object? users = null,
|
||||
Object? chosenPlanId = freezed,
|
||||
Object? chosenPlan = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
@@ -90,6 +92,10 @@ class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel>
|
||||
? _value.users
|
||||
: users // ignore: cast_nullable_to_non_nullable
|
||||
as Users,
|
||||
chosenPlanId: freezed == chosenPlanId
|
||||
? _value.chosenPlanId
|
||||
: chosenPlanId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
chosenPlan: freezed == chosenPlan
|
||||
? _value.chosenPlan
|
||||
: chosenPlan // ignore: cast_nullable_to_non_nullable
|
||||
@@ -146,7 +152,7 @@ abstract class _$$ChatRoomModelImplCopyWith<$Res>
|
||||
@JsonKey(name: 'chat_room_setting')
|
||||
ChatRoomSettingsModel chatRoomSettings,
|
||||
Users users,
|
||||
@JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan)
|
||||
@JsonKey(name: 'chosen_plan_id') int? chosenPlanId,
|
||||
ChosenPlanModel? chosenPlan});
|
||||
|
||||
@override
|
||||
@@ -173,6 +179,7 @@ class __$$ChatRoomModelImplCopyWithImpl<$Res>
|
||||
Object? id = null,
|
||||
Object? chatRoomSettings = null,
|
||||
Object? users = null,
|
||||
Object? chosenPlanId = freezed,
|
||||
Object? chosenPlan = freezed,
|
||||
}) {
|
||||
return _then(_$ChatRoomModelImpl(
|
||||
@@ -188,6 +195,10 @@ class __$$ChatRoomModelImplCopyWithImpl<$Res>
|
||||
? _value.users
|
||||
: users // ignore: cast_nullable_to_non_nullable
|
||||
as Users,
|
||||
chosenPlanId: freezed == chosenPlanId
|
||||
? _value.chosenPlanId
|
||||
: chosenPlanId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
chosenPlan: freezed == chosenPlan
|
||||
? _value.chosenPlan
|
||||
: chosenPlan // ignore: cast_nullable_to_non_nullable
|
||||
@@ -203,8 +214,8 @@ class _$ChatRoomModelImpl implements _ChatRoomModel {
|
||||
{required this.id,
|
||||
@JsonKey(name: 'chat_room_setting') required this.chatRoomSettings,
|
||||
required this.users,
|
||||
@JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan)
|
||||
required this.chosenPlan});
|
||||
@JsonKey(name: 'chosen_plan_id') required this.chosenPlanId,
|
||||
this.chosenPlan});
|
||||
|
||||
factory _$ChatRoomModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ChatRoomModelImplFromJson(json);
|
||||
@@ -217,12 +228,14 @@ class _$ChatRoomModelImpl implements _ChatRoomModel {
|
||||
@override
|
||||
final Users users;
|
||||
@override
|
||||
@JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan)
|
||||
@JsonKey(name: 'chosen_plan_id')
|
||||
final int? chosenPlanId;
|
||||
@override
|
||||
final ChosenPlanModel? chosenPlan;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ChatRoomModel(id: $id, chatRoomSettings: $chatRoomSettings, users: $users, chosenPlan: $chosenPlan)';
|
||||
return 'ChatRoomModel(id: $id, chatRoomSettings: $chatRoomSettings, users: $users, chosenPlanId: $chosenPlanId, chosenPlan: $chosenPlan)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -234,14 +247,16 @@ class _$ChatRoomModelImpl implements _ChatRoomModel {
|
||||
(identical(other.chatRoomSettings, chatRoomSettings) ||
|
||||
other.chatRoomSettings == chatRoomSettings) &&
|
||||
(identical(other.users, users) || other.users == users) &&
|
||||
(identical(other.chosenPlanId, chosenPlanId) ||
|
||||
other.chosenPlanId == chosenPlanId) &&
|
||||
(identical(other.chosenPlan, chosenPlan) ||
|
||||
other.chosenPlan == chosenPlan));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, id, chatRoomSettings, users, chosenPlan);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, id, chatRoomSettings, users, chosenPlanId, chosenPlan);
|
||||
|
||||
/// Create a copy of ChatRoomModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -265,8 +280,8 @@ abstract class _ChatRoomModel implements ChatRoomModel {
|
||||
@JsonKey(name: 'chat_room_setting')
|
||||
required final ChatRoomSettingsModel chatRoomSettings,
|
||||
required final Users users,
|
||||
@JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan)
|
||||
required final ChosenPlanModel? chosenPlan}) = _$ChatRoomModelImpl;
|
||||
@JsonKey(name: 'chosen_plan_id') required final int? chosenPlanId,
|
||||
final ChosenPlanModel? chosenPlan}) = _$ChatRoomModelImpl;
|
||||
|
||||
factory _ChatRoomModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatRoomModelImpl.fromJson;
|
||||
@@ -279,7 +294,9 @@ abstract class _ChatRoomModel implements ChatRoomModel {
|
||||
@override
|
||||
Users get users;
|
||||
@override
|
||||
@JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan)
|
||||
@JsonKey(name: 'chosen_plan_id')
|
||||
int? get chosenPlanId;
|
||||
@override
|
||||
ChosenPlanModel? get chosenPlan;
|
||||
|
||||
/// Create a copy of ChatRoomModel
|
||||
|
||||
@@ -12,7 +12,11 @@ _$ChatRoomModelImpl _$$ChatRoomModelImplFromJson(Map<String, dynamic> json) =>
|
||||
chatRoomSettings: ChatRoomSettingsModel.fromJson(
|
||||
json['chat_room_setting'] as Map<String, dynamic>),
|
||||
users: Users.fromJson(json['users'] as Map<String, dynamic>),
|
||||
chosenPlan: parseChosenPlan(json['chosen_plan']),
|
||||
chosenPlanId: (json['chosen_plan_id'] as num?)?.toInt(),
|
||||
chosenPlan: json['chosenPlan'] == null
|
||||
? null
|
||||
: ChosenPlanModel.fromJson(
|
||||
json['chosenPlan'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatRoomModelImplToJson(_$ChatRoomModelImpl instance) =>
|
||||
@@ -20,7 +24,8 @@ Map<String, dynamic> _$$ChatRoomModelImplToJson(_$ChatRoomModelImpl instance) =>
|
||||
'id': instance.id,
|
||||
'chat_room_setting': instance.chatRoomSettings,
|
||||
'users': instance.users,
|
||||
'chosen_plan': instance.chosenPlan,
|
||||
'chosen_plan_id': instance.chosenPlanId,
|
||||
'chosenPlan': instance.chosenPlan,
|
||||
};
|
||||
|
||||
_$UsersImpl _$$UsersImplFromJson(Map<String, dynamic> json) => _$UsersImpl(
|
||||
|
||||
Reference in New Issue
Block a user