50 lines
1.7 KiB
Dart
50 lines
1.7 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'chat.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
_SnChat _$SnChatFromJson(Map<String, dynamic> json) => _SnChat(
|
|
id: (json['id'] as num).toInt(),
|
|
name: json['name'] as String,
|
|
description: json['description'] as String,
|
|
type: (json['type'] as num).toInt(),
|
|
isPublic: json['is_public'] as bool,
|
|
picture:
|
|
json['picture'] == null
|
|
? null
|
|
: SnCloudFile.fromJson(json['picture'] as Map<String, dynamic>),
|
|
background:
|
|
json['background'] == null
|
|
? null
|
|
: SnCloudFile.fromJson(json['background'] as Map<String, dynamic>),
|
|
realmId: (json['realm_id'] as num?)?.toInt(),
|
|
realm:
|
|
json['realm'] == null
|
|
? null
|
|
: SnRealm.fromJson(json['realm'] as Map<String, dynamic>),
|
|
createdAt: DateTime.parse(json['created_at'] as String),
|
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
|
deletedAt:
|
|
json['deleted_at'] == null
|
|
? null
|
|
: DateTime.parse(json['deleted_at'] as String),
|
|
);
|
|
|
|
Map<String, dynamic> _$SnChatToJson(_SnChat instance) => <String, dynamic>{
|
|
'id': instance.id,
|
|
'name': instance.name,
|
|
'description': instance.description,
|
|
'type': instance.type,
|
|
'is_public': instance.isPublic,
|
|
'picture': instance.picture?.toJson(),
|
|
'background': instance.background?.toJson(),
|
|
'realm_id': instance.realmId,
|
|
'realm': instance.realm?.toJson(),
|
|
'created_at': instance.createdAt.toIso8601String(),
|
|
'updated_at': instance.updatedAt.toIso8601String(),
|
|
'deleted_at': instance.deletedAt?.toIso8601String(),
|
|
};
|