mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-26 05:16:01 +08:00
44
lib/models_new/video/video_note_list/author.dart
Normal file
44
lib/models_new/video/video_note_list/author.dart
Normal file
@@ -0,0 +1,44 @@
|
||||
import 'package:PiliPlus/models/model_avatar.dart';
|
||||
|
||||
class Author {
|
||||
int? mid;
|
||||
String? name;
|
||||
String? face;
|
||||
int? level;
|
||||
int? isSeniorMember;
|
||||
Vip? vipInfo;
|
||||
Pendant? pendant;
|
||||
BaseOfficialVerify? official;
|
||||
int? follower;
|
||||
|
||||
Author({
|
||||
this.mid,
|
||||
this.name,
|
||||
this.face,
|
||||
this.level,
|
||||
this.isSeniorMember,
|
||||
this.vipInfo,
|
||||
this.pendant,
|
||||
this.official,
|
||||
this.follower,
|
||||
});
|
||||
|
||||
factory Author.fromJson(Map<String, dynamic> json) => Author(
|
||||
mid: json['mid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
face: json['face'] as String?,
|
||||
level: json['level'] as int?,
|
||||
isSeniorMember: json['is_senior_member'] as int?,
|
||||
vipInfo: json['vip_info'] == null
|
||||
? null
|
||||
: Vip.fromJson(json['vip_info'] as Map<String, dynamic>),
|
||||
pendant: json['pendant'] == null
|
||||
? null
|
||||
: Pendant.fromJson(json['pendant'] as Map<String, dynamic>),
|
||||
official: json['official'] == null
|
||||
? null
|
||||
: BaseOfficialVerify.fromJson(
|
||||
json['official'] as Map<String, dynamic>),
|
||||
follower: json['follower'] as int?,
|
||||
);
|
||||
}
|
||||
22
lib/models_new/video/video_note_list/data.dart
Normal file
22
lib/models_new/video/video_note_list/data.dart
Normal file
@@ -0,0 +1,22 @@
|
||||
import 'package:PiliPlus/models_new/video/video_note_list/list.dart';
|
||||
import 'package:PiliPlus/models_new/video/video_note_list/page.dart';
|
||||
|
||||
class VideoNoteData {
|
||||
List<VideoNoteItemModel>? list;
|
||||
Page? page;
|
||||
bool? showPublicNote;
|
||||
String? message;
|
||||
|
||||
VideoNoteData({this.list, this.page, this.showPublicNote, this.message});
|
||||
|
||||
factory VideoNoteData.fromJson(Map<String, dynamic> json) => VideoNoteData(
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => VideoNoteItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
page: json['page'] == null
|
||||
? null
|
||||
: Page.fromJson(json['page'] as Map<String, dynamic>),
|
||||
showPublicNote: json['show_public_note'] as bool?,
|
||||
message: json['message'] as String?,
|
||||
);
|
||||
}
|
||||
40
lib/models_new/video/video_note_list/list.dart
Normal file
40
lib/models_new/video/video_note_list/list.dart
Normal file
@@ -0,0 +1,40 @@
|
||||
import 'package:PiliPlus/models_new/video/video_note_list/author.dart';
|
||||
|
||||
class VideoNoteItemModel {
|
||||
int? cvid;
|
||||
String? title;
|
||||
String? summary;
|
||||
String? pubtime;
|
||||
String? webUrl;
|
||||
String? message;
|
||||
Author? author;
|
||||
int? likes;
|
||||
bool? hasLike;
|
||||
|
||||
VideoNoteItemModel({
|
||||
this.cvid,
|
||||
this.title,
|
||||
this.summary,
|
||||
this.pubtime,
|
||||
this.webUrl,
|
||||
this.message,
|
||||
this.author,
|
||||
this.likes,
|
||||
this.hasLike,
|
||||
});
|
||||
|
||||
factory VideoNoteItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
VideoNoteItemModel(
|
||||
cvid: json['cvid'] as int?,
|
||||
title: json['title'] as String?,
|
||||
summary: json['summary'] as String?,
|
||||
pubtime: json['pubtime'] as String?,
|
||||
webUrl: json['web_url'] as String?,
|
||||
message: json['message'] as String?,
|
||||
author: json['author'] == null
|
||||
? null
|
||||
: Author.fromJson(json['author'] as Map<String, dynamic>),
|
||||
likes: json['likes'] as int?,
|
||||
hasLike: json['has_like'] as bool?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/video/video_note_list/page.dart
Normal file
13
lib/models_new/video/video_note_list/page.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Page {
|
||||
int? total;
|
||||
int? size;
|
||||
int? num;
|
||||
|
||||
Page({this.total, this.size, this.num});
|
||||
|
||||
factory Page.fromJson(Map<String, dynamic> json) => Page(
|
||||
total: json['total'] as int?,
|
||||
size: json['size'] as int?,
|
||||
num: json['num'] as int?,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user