// Author: fengshengxiong
// Date: 2024/6/24
// Description: 播放列表模型

import 'dart:convert';

class PlayListModel {
  String? title;
  String? subTitle;
  String? thumbnail;
  String? videoId;
  String? playlistId;
  String? url;

  PlayListModel({
    this.title,
    this.subTitle,
    this.thumbnail,
    this.videoId,
    this.playlistId,
    this.url,
  });

  factory PlayListModel.fromJson(String str) => PlayListModel.fromMap(json.decode(str));

  String toJson() => json.encode(toMap());

  factory PlayListModel.fromMap(Map<String, dynamic> json) => PlayListModel(
    title: json["title"],
    subTitle: json["subTitle"],
    thumbnail: json["thumbnail"],
    videoId: json["videoId"],
    playlistId: json["playlistId"],
    url: json["url"],
  );

  Map<String, dynamic> toMap() => {
    "title": title,
    "subTitle": subTitle,
    "thumbnail": thumbnail,
    "videoId": videoId,
    "playlistId": playlistId,
    "url": url,
  };
}
