mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-21 03:15:14 +08:00
35
lib/models_new/space/space_article/author.dart
Normal file
35
lib/models_new/space/space_article/author.dart
Normal file
@@ -0,0 +1,35 @@
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
|
||||
class Author {
|
||||
int? mid;
|
||||
String? name;
|
||||
String? face;
|
||||
Pendant? pendant;
|
||||
BaseOfficialVerify? officialVerify;
|
||||
Vip? vip;
|
||||
|
||||
Author({
|
||||
this.mid,
|
||||
this.name,
|
||||
this.face,
|
||||
this.pendant,
|
||||
this.officialVerify,
|
||||
this.vip,
|
||||
});
|
||||
|
||||
factory Author.fromJson(Map<String, dynamic> json) => Author(
|
||||
mid: json['mid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
face: json['face'] as String?,
|
||||
pendant: json['pendant'] == null
|
||||
? null
|
||||
: Pendant.fromJson(json['pendant'] as Map<String, dynamic>),
|
||||
officialVerify: json['official_verify'] == null
|
||||
? null
|
||||
: BaseOfficialVerify.fromJson(
|
||||
json['official_verify'] as Map<String, dynamic>),
|
||||
vip: json['vip'] == null
|
||||
? null
|
||||
: Vip.fromJson(json['vip'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
13
lib/models_new/space/space_article/category.dart
Normal file
13
lib/models_new/space/space_article/category.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Category {
|
||||
int? id;
|
||||
int? parentId;
|
||||
String? name;
|
||||
|
||||
Category({this.id, this.parentId, this.name});
|
||||
|
||||
factory Category.fromJson(Map<String, dynamic> json) => Category(
|
||||
id: json['id'] as int?,
|
||||
parentId: json['parent_id'] as int?,
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
23
lib/models_new/space/space_article/data.dart
Normal file
23
lib/models_new/space/space_article/data.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
import 'package:PiliPlus/models_new/space/space_article/item.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_article/list.dart';
|
||||
|
||||
class SpaceArticleData {
|
||||
int? count;
|
||||
List<SpaceArticleItem>? item;
|
||||
int? listsCount;
|
||||
List<SpaceArticleList>? lists;
|
||||
|
||||
SpaceArticleData({this.count, this.item, this.listsCount, this.lists});
|
||||
|
||||
factory SpaceArticleData.fromJson(Map<String, dynamic> json) =>
|
||||
SpaceArticleData(
|
||||
count: json['count'] as int?,
|
||||
item: (json['item'] as List<dynamic>?)
|
||||
?.map((e) => SpaceArticleItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
listsCount: json['lists_count'] as int?,
|
||||
lists: (json['lists'] as List<dynamic>?)
|
||||
?.map((e) => SpaceArticleList.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
135
lib/models_new/space/space_article/item.dart
Normal file
135
lib/models_new/space/space_article/item.dart
Normal file
@@ -0,0 +1,135 @@
|
||||
import 'package:PiliPlus/models_new/space/space_article/author.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_article/category.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_article/media.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_article/stats.dart';
|
||||
|
||||
class SpaceArticleItem {
|
||||
int? id;
|
||||
Category? category;
|
||||
List<Category>? categories;
|
||||
String? title;
|
||||
String? summary;
|
||||
String? bannerUrl;
|
||||
int? templateId;
|
||||
int? state;
|
||||
Author? author;
|
||||
int? reprint;
|
||||
List<String>? imageUrls;
|
||||
int? publishTime;
|
||||
int? ctime;
|
||||
int? mtime;
|
||||
Stats? stats;
|
||||
int? attributes;
|
||||
int? words;
|
||||
List<String>? originImageUrls;
|
||||
dynamic list;
|
||||
bool? isLike;
|
||||
Media? media;
|
||||
String? applyTime;
|
||||
String? checkTime;
|
||||
int? original;
|
||||
int? actId;
|
||||
dynamic dispute;
|
||||
dynamic authenMark;
|
||||
int? coverAvid;
|
||||
dynamic topVideoInfo;
|
||||
int? type;
|
||||
int? checkState;
|
||||
int? originTemplateId;
|
||||
String? uri;
|
||||
String? param;
|
||||
String? goto;
|
||||
String? publishTimeText;
|
||||
String? dynam1c;
|
||||
|
||||
SpaceArticleItem({
|
||||
this.id,
|
||||
this.category,
|
||||
this.categories,
|
||||
this.title,
|
||||
this.summary,
|
||||
this.bannerUrl,
|
||||
this.templateId,
|
||||
this.state,
|
||||
this.author,
|
||||
this.reprint,
|
||||
this.imageUrls,
|
||||
this.publishTime,
|
||||
this.ctime,
|
||||
this.mtime,
|
||||
this.stats,
|
||||
this.attributes,
|
||||
this.words,
|
||||
this.originImageUrls,
|
||||
this.list,
|
||||
this.isLike,
|
||||
this.media,
|
||||
this.applyTime,
|
||||
this.checkTime,
|
||||
this.original,
|
||||
this.actId,
|
||||
this.dispute,
|
||||
this.authenMark,
|
||||
this.coverAvid,
|
||||
this.topVideoInfo,
|
||||
this.type,
|
||||
this.checkState,
|
||||
this.originTemplateId,
|
||||
this.uri,
|
||||
this.param,
|
||||
this.goto,
|
||||
this.publishTimeText,
|
||||
this.dynam1c,
|
||||
});
|
||||
|
||||
factory SpaceArticleItem.fromJson(Map<String, dynamic> json) =>
|
||||
SpaceArticleItem(
|
||||
id: json['id'] as int?,
|
||||
category: json['category'] == null
|
||||
? null
|
||||
: Category.fromJson(json['category'] as Map<String, dynamic>),
|
||||
categories: (json['categories'] as List<dynamic>?)
|
||||
?.map((e) => Category.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
title: json['title'] as String?,
|
||||
summary: json['summary'] as String?,
|
||||
bannerUrl: json['banner_url'] as String?,
|
||||
templateId: json['template_id'] as int?,
|
||||
state: json['state'] as int?,
|
||||
author: json['author'] == null
|
||||
? null
|
||||
: Author.fromJson(json['author'] as Map<String, dynamic>),
|
||||
reprint: json['reprint'] as int?,
|
||||
imageUrls: (json['image_urls'] as List?)?.cast(),
|
||||
publishTime: json['publish_time'] as int?,
|
||||
ctime: json['ctime'] as int?,
|
||||
mtime: json['mtime'] as int?,
|
||||
stats: json['stats'] == null
|
||||
? null
|
||||
: Stats.fromJson(json['stats'] as Map<String, dynamic>),
|
||||
attributes: json['attributes'] as int?,
|
||||
words: json['words'] as int?,
|
||||
originImageUrls: (json['origin_image_urls'] as List?)?.cast(),
|
||||
list: json['list'] as dynamic,
|
||||
isLike: json['is_like'] as bool?,
|
||||
media: json['media'] == null
|
||||
? null
|
||||
: Media.fromJson(json['media'] as Map<String, dynamic>),
|
||||
applyTime: json['apply_time'] as String?,
|
||||
checkTime: json['check_time'] as String?,
|
||||
original: json['original'] as int?,
|
||||
actId: json['act_id'] as int?,
|
||||
dispute: json['dispute'] as dynamic,
|
||||
authenMark: json['authenMark'] as dynamic,
|
||||
coverAvid: json['cover_avid'] as int?,
|
||||
topVideoInfo: json['top_video_info'] as dynamic,
|
||||
type: json['type'] as int?,
|
||||
checkState: json['check_state'] as int?,
|
||||
originTemplateId: json['origin_template_id'] as int?,
|
||||
uri: json['uri'] as String?,
|
||||
param: json['param'] as String?,
|
||||
goto: json['goto'] as String?,
|
||||
publishTimeText: json['publish_time_text'] as String?,
|
||||
dynam1c: json['dynamic'] as String?,
|
||||
);
|
||||
}
|
||||
45
lib/models_new/space/space_article/list.dart
Normal file
45
lib/models_new/space/space_article/list.dart
Normal file
@@ -0,0 +1,45 @@
|
||||
class SpaceArticleList {
|
||||
int? id;
|
||||
int? mid;
|
||||
String? name;
|
||||
String? imageUrl;
|
||||
int? updateTime;
|
||||
int? ctime;
|
||||
int? publishTime;
|
||||
String? summary;
|
||||
int? words;
|
||||
int? read;
|
||||
int? articlesCount;
|
||||
String? updateTimeText;
|
||||
|
||||
SpaceArticleList({
|
||||
this.id,
|
||||
this.mid,
|
||||
this.name,
|
||||
this.imageUrl,
|
||||
this.updateTime,
|
||||
this.ctime,
|
||||
this.publishTime,
|
||||
this.summary,
|
||||
this.words,
|
||||
this.read,
|
||||
this.articlesCount,
|
||||
this.updateTimeText,
|
||||
});
|
||||
|
||||
factory SpaceArticleList.fromJson(Map<String, dynamic> json) =>
|
||||
SpaceArticleList(
|
||||
id: json['id'] as int?,
|
||||
mid: json['mid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
imageUrl: json['image_url'] as String?,
|
||||
updateTime: json['update_time'] as int?,
|
||||
ctime: json['ctime'] as int?,
|
||||
publishTime: json['publish_time'] as int?,
|
||||
summary: json['summary'] as String?,
|
||||
words: json['words'] as int?,
|
||||
read: json['read'] as int?,
|
||||
articlesCount: json['articles_count'] as int?,
|
||||
updateTimeText: json['update_time_text'] as String?,
|
||||
);
|
||||
}
|
||||
32
lib/models_new/space/space_article/media.dart
Normal file
32
lib/models_new/space/space_article/media.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
class Media {
|
||||
int? score;
|
||||
int? mediaId;
|
||||
String? title;
|
||||
String? cover;
|
||||
String? area;
|
||||
int? typeId;
|
||||
String? typeName;
|
||||
int? spoiler;
|
||||
|
||||
Media({
|
||||
this.score,
|
||||
this.mediaId,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.area,
|
||||
this.typeId,
|
||||
this.typeName,
|
||||
this.spoiler,
|
||||
});
|
||||
|
||||
factory Media.fromJson(Map<String, dynamic> json) => Media(
|
||||
score: json['score'] as int?,
|
||||
mediaId: json['media_id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
area: json['area'] as String?,
|
||||
typeId: json['type_id'] as int?,
|
||||
typeName: json['type_name'] as String?,
|
||||
spoiler: json['spoiler'] as int?,
|
||||
);
|
||||
}
|
||||
32
lib/models_new/space/space_article/stats.dart
Normal file
32
lib/models_new/space/space_article/stats.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
class Stats {
|
||||
int? view;
|
||||
int? favorite;
|
||||
int? like;
|
||||
int? dislike;
|
||||
int? reply;
|
||||
int? share;
|
||||
int? coin;
|
||||
int? dynam1c;
|
||||
|
||||
Stats({
|
||||
this.view,
|
||||
this.favorite,
|
||||
this.like,
|
||||
this.dislike,
|
||||
this.reply,
|
||||
this.share,
|
||||
this.coin,
|
||||
this.dynam1c,
|
||||
});
|
||||
|
||||
factory Stats.fromJson(Map<String, dynamic> json) => Stats(
|
||||
view: json['view'] as int?,
|
||||
favorite: json['favorite'] as int?,
|
||||
like: json['like'] as int?,
|
||||
dislike: json['dislike'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
share: json['share'] as int?,
|
||||
coin: json['coin'] as int?,
|
||||
dynam1c: json['dynamic'] as int?,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user