clean up models

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-04-05 12:10:18 +08:00
parent b897103af0
commit 279f21857d
308 changed files with 156 additions and 6243 deletions

View File

@@ -9,7 +9,6 @@ class Author {
Vip? vipInfo;
Pendant? pendant;
BaseOfficialVerify? official;
int? follower;
Author({
this.mid,
@@ -20,7 +19,6 @@ class Author {
this.vipInfo,
this.pendant,
this.official,
this.follower,
});
factory Author.fromJson(Map<String, dynamic> json) => Author(
@@ -38,6 +36,5 @@ class Author {
official: json['official'] == null
? null
: BaseOfficialVerify.fromJson(json['official'] as Map<String, dynamic>),
follower: json['follower'] as int?,
);
}

View File

@@ -4,10 +4,8 @@ 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});
VideoNoteData({this.list, this.page});
factory VideoNoteData.fromJson(Map<String, dynamic> json) => VideoNoteData(
list: (json['list'] as List<dynamic>?)
@@ -16,7 +14,5 @@ class VideoNoteData {
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?,
);
}

View File

@@ -2,39 +2,24 @@ 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?,
);
}

View File

@@ -1,13 +1,9 @@
class Page {
int? total;
int? size;
int? num;
Page({this.total, this.size, this.num});
Page({this.total});
factory Page.fromJson(Map<String, dynamic> json) => Page(
total: json['total'] as int?,
size: json['size'] as int?,
num: json['num'] as int?,
);
}