mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-21 19:28:27 +08:00
19
lib/models_new/article/article_view/opus.dart
Normal file
19
lib/models_new/article/article_view/opus.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:PiliPlus/models/dynamics/article_content_model.dart';
|
||||
|
||||
class ArticleOpus {
|
||||
int? opusid;
|
||||
int? opussource;
|
||||
String? title;
|
||||
List<ArticleContentModel>? content;
|
||||
|
||||
ArticleOpus.fromJson(Map<String, dynamic> json) {
|
||||
opusid = json['opus_id'];
|
||||
opussource = json['opus_source'];
|
||||
title = json['title'];
|
||||
if (json['content']?['paragraphs'] is List) {
|
||||
content = (json['content']['paragraphs'] as List)
|
||||
.map((i) => ArticleContentModel.fromJson(i))
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user