parent
3a15265753
commit
db68667f41
@ -0,0 +1,36 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
import 'package:aku_community/model/common/img_model.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
part 'community_introduce_model.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class CommunityIontroduceModel extends Equatable {
|
||||
final int id;
|
||||
final String name;
|
||||
final String content;
|
||||
final String createDate;
|
||||
final List<ImgModel>? imgList;
|
||||
CommunityIontroduceModel({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.content,
|
||||
required this.createDate,
|
||||
this.imgList,
|
||||
});
|
||||
factory CommunityIontroduceModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$CommunityIontroduceModelFromJson(json);
|
||||
|
||||
factory CommunityIontroduceModel.init() =>
|
||||
CommunityIontroduceModel(id: -1, name: '', content: '', createDate: '');
|
||||
@override
|
||||
List<Object?> get props {
|
||||
return [
|
||||
id,
|
||||
name,
|
||||
content,
|
||||
createDate,
|
||||
imgList,
|
||||
];
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'community_introduce_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
CommunityIontroduceModel _$CommunityIontroduceModelFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return CommunityIontroduceModel(
|
||||
id: json['id'] as int,
|
||||
name: json['name'] as String,
|
||||
content: json['content'] as String,
|
||||
createDate: json['createDate'] as String,
|
||||
imgList: (json['imgList'] as List<dynamic>?)
|
||||
?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
part 'service_browse_list_mode.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class ServiceBrowseListModel extends Equatable {
|
||||
final int id;
|
||||
final String name;
|
||||
final String content;
|
||||
final String createDate;
|
||||
ServiceBrowseListModel({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.content,
|
||||
required this.createDate,
|
||||
});
|
||||
factory ServiceBrowseListModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$ServiceBrowseListModelFromJson(json);
|
||||
@override
|
||||
List<Object> get props => [id, name, content, createDate];
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'service_browse_list_mode.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
ServiceBrowseListModel _$ServiceBrowseListModelFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return ServiceBrowseListModel(
|
||||
id: json['id'] as int,
|
||||
name: json['name'] as String,
|
||||
content: json['content'] as String,
|
||||
createDate: json['createDate'] as String,
|
||||
);
|
||||
}
|
Loading…
Reference in new issue