parent
3da2ce23ec
commit
c52ce50277
@ -0,0 +1,36 @@
|
||||
import 'package:aku_new_community/model/common/img_model.dart';
|
||||
import 'package:aku_new_community/models/community/all_dynamic_list_model.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'dynamic_my_list_body.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class DynamicMyListBody {
|
||||
final int id;
|
||||
final String? content;
|
||||
final int isComment;
|
||||
final int isPublic;
|
||||
final String createDate;
|
||||
final int likes;
|
||||
final int views;
|
||||
final int commentNum;
|
||||
final List<ImgModel> dynamicImgList;
|
||||
final List<TopicTag> topicTags;
|
||||
final bool isLike;
|
||||
factory DynamicMyListBody.fromJson(Map<String, dynamic> json) =>
|
||||
_$DynamicMyListBodyFromJson(json);
|
||||
|
||||
const DynamicMyListBody({
|
||||
required this.id,
|
||||
this.content,
|
||||
required this.isComment,
|
||||
required this.isPublic,
|
||||
required this.createDate,
|
||||
required this.likes,
|
||||
required this.views,
|
||||
required this.commentNum,
|
||||
required this.dynamicImgList,
|
||||
required this.topicTags,
|
||||
required this.isLike,
|
||||
});
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'dynamic_my_list_body.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
DynamicMyListBody _$DynamicMyListBodyFromJson(Map<String, dynamic> json) =>
|
||||
DynamicMyListBody(
|
||||
id: json['id'] as int,
|
||||
content: json['content'] as String?,
|
||||
isComment: json['isComment'] as int,
|
||||
isPublic: json['isPublic'] as int,
|
||||
createDate: json['createDate'] as String,
|
||||
likes: json['likes'] as int,
|
||||
views: json['views'] as int,
|
||||
commentNum: json['commentNum'] as int,
|
||||
dynamicImgList: (json['dynamicImgList'] as List<dynamic>)
|
||||
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
topicTags: (json['topicTags'] as List<dynamic>)
|
||||
.map((e) => TopicTag.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
isLike: json['isLike'] as bool,
|
||||
);
|
@ -0,0 +1,25 @@
|
||||
import 'package:aku_new_community/model/common/img_model.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'dynamic_my_list_head.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class DynamicMyListHead {
|
||||
final int id;
|
||||
final String createName;
|
||||
final List<ImgModel> avatarImgList;
|
||||
final int dynamicNum;
|
||||
final int commentNum;
|
||||
final int likesNum;
|
||||
factory DynamicMyListHead.fromJson(Map<String, dynamic> json) =>
|
||||
_$DynamicMyListHeadFromJson(json);
|
||||
|
||||
const DynamicMyListHead({
|
||||
required this.id,
|
||||
required this.createName,
|
||||
required this.avatarImgList,
|
||||
required this.dynamicNum,
|
||||
required this.commentNum,
|
||||
required this.likesNum,
|
||||
});
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'dynamic_my_list_head.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
DynamicMyListHead _$DynamicMyListHeadFromJson(Map<String, dynamic> json) =>
|
||||
DynamicMyListHead(
|
||||
id: json['id'] as int,
|
||||
createName: json['createName'] as String,
|
||||
avatarImgList: (json['avatarImgList'] as List<dynamic>)
|
||||
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
dynamicNum: json['dynamicNum'] as int,
|
||||
commentNum: json['commentNum'] as int,
|
||||
likesNum: json['likesNum'] as int,
|
||||
);
|
Loading…
Reference in new issue