import 'package:json_annotation/json_annotation.dart'; import 'package:equatable/equatable.dart'; import 'package:project_telephony/ui/user/content_details_page.dart'; part 'user_info_model.g.dart'; @JsonSerializable() class UserInfoModel extends Equatable { final int id; final String name; final String phone; final int isVip; final String tag; final int status; final num start; final num end; final List? contentRef; final List? contentCon; factory UserInfoModel.fromJson(Map json) => _$UserInfoModelFromJson(json); Map toJson() => _$UserInfoModelToJson(this); static UserInfoModel get fail => const UserInfoModel( id: 0, name: '', phone: '', isVip: 0, tag: '', status: 0, start: 0, end: 0, contentCon: [], contentRef: [], ); const UserInfoModel( {required this.id, required this.name, required this.phone, required this.isVip, required this.tag, required this.status, required this.start, required this.end, required this.contentCon, required this.contentRef, }); @override List get props => [id, name, phone, isVip, tag, status, start, end, contentCon,contentRef]; } @JsonSerializable() class Content extends Equatable { final int id; final String content; const Content({ required this.id, required this.content, }); factory Content.fromJson(Map json) => _$ContentFromJson(json); Map toJson() => _$ContentToJson(this); @override List get props => [id, content]; }