You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aku_new_community/lib/models/news/news_item_model.dart

26 lines
625 B

import 'package:aku_new_community/model/common/img_model.dart';
import 'package:flustars/flustars.dart';
import 'package:json_annotation/json_annotation.dart';
part 'news_item_model.g.dart';
@JsonSerializable()
class NewsItemModel {
final int id;
final String title;
final String createDate;
final List<ImgModel> imgList;
DateTime? get create => DateUtil.getDateTime(createDate);
NewsItemModel({
required this.id,
required this.title,
required this.createDate,
required this.imgList,
});
factory NewsItemModel.fromJson(Map<String, dynamic> json) =>
_$NewsItemModelFromJson(json);
}