//
//  MPPositive_LibraryViewModel.swift
//  relax.offline.mp3.music
//
//  Created by Mr.Zhou on 2024/7/24.
//

import UIKit
import Kingfisher
class MPPositive_LibraryViewModel: NSObject {
    ///封面(使用默认占位符)
    var cover:URL?
    ///标题
    var title:String = "Text"
    ///曲库实体
    var library:MPPositive_LibraryItemModel
    
    init(_ library: MPPositive_LibraryItemModel) {
        self.library = library
        super.init()
        configure()
    }
    //分配
    private func configure() {
        //检索是否存在封面
        if let coverUrl = library.coverUrl {
            cover = coverUrl
        }
        title = library.title
    }
}
