|
|
@ -3,79 +3,62 @@ import 'package:common_utils/common_utils.dart';
|
|
|
|
import 'package:aku_new_community/model/common/img_model.dart';
|
|
|
|
import 'package:aku_new_community/model/common/img_model.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class AdviceDetailModel {
|
|
|
|
class AdviceDetailModel {
|
|
|
|
AppAdviceDetailVo? appAdviceDetailVo;
|
|
|
|
AppAdviceFBIDetailVo? appAdviceFBIDetailVo;
|
|
|
|
|
|
|
|
List<AppAdviceFBIContentVos>? appAdviceFBIContentVos;
|
|
|
|
|
|
|
|
|
|
|
|
AdviceDetailModel({this.appAdviceDetailVo});
|
|
|
|
AdviceDetailModel({this.appAdviceFBIDetailVo, this.appAdviceFBIContentVos});
|
|
|
|
|
|
|
|
|
|
|
|
AdviceDetailModel.fromJson(Map<String, dynamic> json) {
|
|
|
|
AdviceDetailModel.fromJson(Map<String, dynamic> json) {
|
|
|
|
appAdviceDetailVo = json['appAdviceDetailVo'] != null
|
|
|
|
appAdviceFBIDetailVo = json['appAdviceFBIDetailVo'] != null
|
|
|
|
? new AppAdviceDetailVo.fromJson(json['appAdviceDetailVo'])
|
|
|
|
? new AppAdviceFBIDetailVo.fromJson(json['appAdviceFBIDetailVo'])
|
|
|
|
: null;
|
|
|
|
: null;
|
|
|
|
}
|
|
|
|
if (json['appAdviceFBIContentVos'] != null) {
|
|
|
|
|
|
|
|
appAdviceFBIContentVos = [];
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
json['appAdviceFBIContentVos'].forEach((v) {
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
appAdviceFBIContentVos!.add(new AppAdviceFBIContentVos.fromJson(v));
|
|
|
|
if (this.appAdviceDetailVo != null) {
|
|
|
|
|
|
|
|
data['appAdviceDetailVo'] = this.appAdviceDetailVo!.toJson();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return data;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class AppAdviceDetailVo {
|
|
|
|
|
|
|
|
AppAdviceVo? appAdviceVo;
|
|
|
|
|
|
|
|
List<AppAdviceContentVos>? appAdviceContentVos;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AppAdviceDetailVo({this.appAdviceVo, this.appAdviceContentVos});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AppAdviceDetailVo.fromJson(Map<String, dynamic> json) {
|
|
|
|
|
|
|
|
appAdviceVo = json['appAdviceVo'] != null
|
|
|
|
|
|
|
|
? new AppAdviceVo.fromJson(json['appAdviceVo'])
|
|
|
|
|
|
|
|
: null;
|
|
|
|
|
|
|
|
if (json['appAdviceContentVos'] != null) {
|
|
|
|
|
|
|
|
appAdviceContentVos = [];
|
|
|
|
|
|
|
|
json['appAdviceContentVos'].forEach((v) {
|
|
|
|
|
|
|
|
appAdviceContentVos!.add(new AppAdviceContentVos.fromJson(v));
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
if (this.appAdviceVo != null) {
|
|
|
|
if (this.appAdviceFBIDetailVo != null) {
|
|
|
|
data['appAdviceVo'] = this.appAdviceVo!.toJson();
|
|
|
|
data['appAdviceFBIDetailVo'] = this.appAdviceFBIDetailVo!.toJson();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.appAdviceContentVos != null) {
|
|
|
|
if (this.appAdviceFBIContentVos != null) {
|
|
|
|
data['appAdviceContentVos'] =
|
|
|
|
data['appAdviceFBIContentVos'] =
|
|
|
|
this.appAdviceContentVos!.map((v) => v.toJson()).toList();
|
|
|
|
this.appAdviceFBIContentVos!.map((v) => v.toJson()).toList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return data;
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class AppAdviceVo {
|
|
|
|
class AppAdviceFBIDetailVo {
|
|
|
|
int? id;
|
|
|
|
int? id;
|
|
|
|
int? type;
|
|
|
|
int? type;
|
|
|
|
int? status;
|
|
|
|
int? status;
|
|
|
|
String? content;
|
|
|
|
String? content;
|
|
|
|
|
|
|
|
int? score;
|
|
|
|
String? createDate;
|
|
|
|
String? createDate;
|
|
|
|
List<ImgModel>? imgUrls;
|
|
|
|
List<ImgModel>? imgUrls;
|
|
|
|
|
|
|
|
|
|
|
|
DateTime? get date => DateUtil.getDateTime(createDate!);
|
|
|
|
DateTime? get date => DateUtil.getDateTime(createDate!);
|
|
|
|
|
|
|
|
|
|
|
|
AppAdviceVo(
|
|
|
|
AppAdviceFBIDetailVo(
|
|
|
|
{this.id,
|
|
|
|
{this.id,
|
|
|
|
this.type,
|
|
|
|
this.type,
|
|
|
|
this.status,
|
|
|
|
this.status,
|
|
|
|
this.content,
|
|
|
|
this.content,
|
|
|
|
|
|
|
|
this.score,
|
|
|
|
this.createDate,
|
|
|
|
this.createDate,
|
|
|
|
this.imgUrls});
|
|
|
|
this.imgUrls});
|
|
|
|
|
|
|
|
|
|
|
|
AppAdviceVo.fromJson(Map<String, dynamic> json) {
|
|
|
|
AppAdviceFBIDetailVo.fromJson(Map<String, dynamic> json) {
|
|
|
|
id = json['id'];
|
|
|
|
id = json['id'];
|
|
|
|
type = json['type'];
|
|
|
|
type = json['type'];
|
|
|
|
status = json['status'];
|
|
|
|
status = json['status'];
|
|
|
|
content = json['content'];
|
|
|
|
content = json['content'];
|
|
|
|
|
|
|
|
score = json['score'];
|
|
|
|
createDate = json['createDate'];
|
|
|
|
createDate = json['createDate'];
|
|
|
|
if (json['imgUrls'] != null) {
|
|
|
|
if (json['imgUrls'] != null) {
|
|
|
|
imgUrls = [];
|
|
|
|
imgUrls = [];
|
|
|
@ -91,6 +74,7 @@ class AppAdviceVo {
|
|
|
|
data['type'] = this.type;
|
|
|
|
data['type'] = this.type;
|
|
|
|
data['status'] = this.status;
|
|
|
|
data['status'] = this.status;
|
|
|
|
data['content'] = this.content;
|
|
|
|
data['content'] = this.content;
|
|
|
|
|
|
|
|
data['score'] = this.score;
|
|
|
|
data['createDate'] = this.createDate;
|
|
|
|
data['createDate'] = this.createDate;
|
|
|
|
if (this.imgUrls != null) {
|
|
|
|
if (this.imgUrls != null) {
|
|
|
|
data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
|
|
|
|
data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
|
|
|
@ -99,14 +83,14 @@ class AppAdviceVo {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class AppAdviceContentVos {
|
|
|
|
class AppAdviceFBIContentVos {
|
|
|
|
int? id;
|
|
|
|
int? id;
|
|
|
|
int? createUserType;
|
|
|
|
int? createUserType;
|
|
|
|
String? content;
|
|
|
|
String? content;
|
|
|
|
String? createDate;
|
|
|
|
String? createDate;
|
|
|
|
int? parentId;
|
|
|
|
int? parentId;
|
|
|
|
|
|
|
|
|
|
|
|
AppAdviceContentVos(
|
|
|
|
AppAdviceFBIContentVos(
|
|
|
|
{this.id,
|
|
|
|
{this.id,
|
|
|
|
this.createUserType,
|
|
|
|
this.createUserType,
|
|
|
|
this.content,
|
|
|
|
this.content,
|
|
|
@ -115,7 +99,7 @@ class AppAdviceContentVos {
|
|
|
|
|
|
|
|
|
|
|
|
DateTime? get date => DateUtil.getDateTime(createDate!);
|
|
|
|
DateTime? get date => DateUtil.getDateTime(createDate!);
|
|
|
|
|
|
|
|
|
|
|
|
AppAdviceContentVos.fromJson(Map<String, dynamic> json) {
|
|
|
|
AppAdviceFBIContentVos.fromJson(Map<String, dynamic> json) {
|
|
|
|
id = json['id'];
|
|
|
|
id = json['id'];
|
|
|
|
createUserType = json['createUserType'];
|
|
|
|
createUserType = json['createUserType'];
|
|
|
|
content = json['content'];
|
|
|
|
content = json['content'];
|
|
|
|