forked from eatvio/eatvio_app
19 lines
616 B
Dart
19 lines
616 B
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'chat_user_model.freezed.dart';
|
|
part 'chat_user_model.g.dart';
|
|
|
|
@freezed
|
|
abstract class ChatUserModel with _$ChatUserModel {
|
|
const factory ChatUserModel({
|
|
required int id,
|
|
required String name,
|
|
required String slug,
|
|
@JsonKey(name: 'profile_photo_url') String? profilePhotoUrl,
|
|
@Default(false) @JsonKey(name: 'is_online') bool isOnline,
|
|
@Default('') @JsonKey(name: 'last_seen_text') String lastSeenText,
|
|
}) = _ChatUserModel;
|
|
|
|
factory ChatUserModel.fromJson(Map<String, Object?> json) => _$ChatUserModelFromJson(json);
|
|
}
|