opt models

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-06-04 15:20:35 +08:00
parent f50b1d2beb
commit b960359a39
858 changed files with 11000 additions and 12588 deletions

View File

@@ -0,0 +1,29 @@
class Arc {
int? oid;
String? bvid;
String? pic;
String? desc;
int? status;
int? oidType;
int? aid;
Arc({
this.oid,
this.bvid,
this.pic,
this.desc,
this.status,
this.oidType,
this.aid,
});
factory Arc.fromJson(Map<String, dynamic> json) => Arc(
oid: json['oid'] as int?,
bvid: json['bvid'] as String?,
pic: json['pic'] as String?,
desc: json['desc'] as String?,
status: json['status'] as int?,
oidType: json['oid_type'] as int?,
aid: json['aid'] as int?,
);
}

View File

@@ -0,0 +1,18 @@
import 'package:PiliPlus/models_new/fav/fav_note/list.dart';
import 'package:PiliPlus/models_new/fav/fav_note/page.dart';
class FavNoteData {
List<FavNoteItemModel>? list;
Page? page;
FavNoteData({this.list, this.page});
factory FavNoteData.fromJson(Map<String, dynamic> json) => FavNoteData(
list: (json['list'] as List<dynamic>?)
?.map((e) => FavNoteItemModel.fromJson(e as Map<String, dynamic>))
.toList(),
page: json['page'] == null
? null
: Page.fromJson(json['page'] as Map<String, dynamic>),
);
}

View File

@@ -0,0 +1,31 @@
import 'package:PiliPlus/pages/common/multi_select_controller.dart';
class FavNoteItemModel with MultiSelectData {
FavNoteItemModel({
this.webUrl,
this.title,
this.summary,
this.message,
this.pic,
this.cvid,
this.noteId,
});
String? webUrl;
String? title;
String? summary;
String? message;
String? pic;
dynamic cvid;
dynamic noteId;
FavNoteItemModel.fromJson(Map json) {
webUrl = json['web_url'];
title = json['title'];
summary = json['summary'];
message = json['message'];
pic = json['arc']?['pic'];
cvid = json['cvid'];
noteId = json['note_id'];
}
}

View 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?,
);
}