mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-24 19:16:44 +08:00
32 lines
781 B
Dart
32 lines
781 B
Dart
class SegmentItemModel {
|
|
String? cid;
|
|
String category;
|
|
String? actionType;
|
|
List<int> segment;
|
|
String uuid;
|
|
num? videoDuration;
|
|
|
|
SegmentItemModel({
|
|
this.cid,
|
|
required this.category,
|
|
this.actionType,
|
|
required this.segment,
|
|
required this.uuid,
|
|
this.videoDuration,
|
|
});
|
|
|
|
factory SegmentItemModel.fromJson(Map<String, dynamic> json) =>
|
|
SegmentItemModel(
|
|
cid: json["cid"],
|
|
category: json["category"],
|
|
actionType: json["actionType"],
|
|
segment: (json["segment"] as List)
|
|
.map((e) => ((e as num) * 1000).round())
|
|
.toList(),
|
|
uuid: json["UUID"],
|
|
videoDuration: json["videoDuration"] == null
|
|
? null
|
|
: (json["videoDuration"] as num) * 1000,
|
|
);
|
|
}
|