parent
b013c55984
commit
c24905ea5f
@ -0,0 +1,16 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'information_category_list_model.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class InformationCategoryListModel {
|
||||
final int id;
|
||||
final String name;
|
||||
factory InformationCategoryListModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$InformationCategoryListModelFromJson(json);
|
||||
|
||||
const InformationCategoryListModel({
|
||||
required this.id,
|
||||
required this.name,
|
||||
});
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'information_category_list_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
InformationCategoryListModel _$InformationCategoryListModelFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
InformationCategoryListModel(
|
||||
id: json['id'] as int,
|
||||
name: json['name'] as String,
|
||||
);
|
@ -0,0 +1,26 @@
|
||||
import 'package:aku_new_community/model/common/img_model.dart';
|
||||
import 'package:common_utils/common_utils.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'information_list_model.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class InformationListModel {
|
||||
final int id;
|
||||
final String title;
|
||||
final String content;
|
||||
final int viewsNum;
|
||||
final String createDate;
|
||||
final List<ImgModel> imgList;
|
||||
factory InformationListModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$InformationListModelFromJson(json);
|
||||
DateTime? get createDateDT => DateUtil.getDateTime(createDate);
|
||||
const InformationListModel({
|
||||
required this.id,
|
||||
required this.title,
|
||||
required this.content,
|
||||
required this.viewsNum,
|
||||
required this.createDate,
|
||||
required this.imgList,
|
||||
});
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'information_list_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
InformationListModel _$InformationListModelFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
InformationListModel(
|
||||
id: json['id'] as int,
|
||||
title: json['title'] as String,
|
||||
content: json['content'] as String,
|
||||
viewsNum: json['viewsNum'] as int,
|
||||
createDate: json['createDate'] as String,
|
||||
imgList: (json['imgList'] as List<dynamic>)
|
||||
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
@ -0,0 +1,26 @@
|
||||
import 'package:aku_new_community/model/common/img_model.dart';
|
||||
import 'package:common_utils/common_utils.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'recommend_read_model.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class RecommendReadModel {
|
||||
final int id;
|
||||
final String title;
|
||||
final String content;
|
||||
final int viewsNum;
|
||||
final String createDate;
|
||||
final List<ImgModel> imgList;
|
||||
factory RecommendReadModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$RecommendReadModelFromJson(json);
|
||||
DateTime? get createDateDT => DateUtil.getDateTime(createDate);
|
||||
const RecommendReadModel({
|
||||
required this.id,
|
||||
required this.title,
|
||||
required this.content,
|
||||
required this.viewsNum,
|
||||
required this.createDate,
|
||||
required this.imgList,
|
||||
});
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'recommend_read_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
RecommendReadModel _$RecommendReadModelFromJson(Map<String, dynamic> json) =>
|
||||
RecommendReadModel(
|
||||
id: json['id'] as int,
|
||||
title: json['title'] as String,
|
||||
content: json['content'] as String,
|
||||
viewsNum: json['viewsNum'] as int,
|
||||
createDate: json['createDate'] as String,
|
||||
imgList: (json['imgList'] as List<dynamic>)
|
||||
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
@ -0,0 +1,27 @@
|
||||
import 'package:aku_new_community/model/common/img_model.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'thumbs_up_list_model.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class ThumbsUpListModel {
|
||||
final int id;
|
||||
final int status;
|
||||
final int sendId;
|
||||
final String sendName;
|
||||
final String sendDate;
|
||||
final List<ImgModel> avatarImgList;
|
||||
final List<ImgModel> dynamicImgList;
|
||||
factory ThumbsUpListModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$ThumbsUpListModelFromJson(json);
|
||||
|
||||
const ThumbsUpListModel({
|
||||
required this.id,
|
||||
required this.status,
|
||||
required this.sendId,
|
||||
required this.sendName,
|
||||
required this.sendDate,
|
||||
required this.avatarImgList,
|
||||
required this.dynamicImgList,
|
||||
});
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'thumbs_up_list_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
ThumbsUpListModel _$ThumbsUpListModelFromJson(Map<String, dynamic> json) =>
|
||||
ThumbsUpListModel(
|
||||
id: json['id'] as int,
|
||||
status: json['status'] as int,
|
||||
sendId: json['sendId'] as int,
|
||||
sendName: json['sendName'] as String,
|
||||
sendDate: json['sendDate'] as String,
|
||||
avatarImgList: (json['avatarImgList'] as List<dynamic>)
|
||||
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
dynamicImgList: (json['dynamicImgList'] as List<dynamic>)
|
||||
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
Loading…
Reference in new issue