mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-03 08:39:46 +08:00
opt handle res
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
41
lib/models/video/note_list/list.dart
Normal file
41
lib/models/video/note_list/list.dart
Normal file
@@ -0,0 +1,41 @@
|
||||
import 'package:PiliPlus/models/video/note_list/author.dart';
|
||||
|
||||
class NoteListItemModel {
|
||||
int? cvid;
|
||||
String? title;
|
||||
String? summary;
|
||||
String? pubtime;
|
||||
String? webUrl;
|
||||
String? message;
|
||||
Author? author;
|
||||
int? likes;
|
||||
bool? hasLike;
|
||||
|
||||
NoteListItemModel({
|
||||
this.cvid,
|
||||
this.title,
|
||||
this.summary,
|
||||
this.pubtime,
|
||||
this.webUrl,
|
||||
this.message,
|
||||
this.author,
|
||||
this.likes,
|
||||
this.hasLike,
|
||||
});
|
||||
|
||||
factory NoteListItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
NoteListItemModel(
|
||||
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?,
|
||||
);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user