# Path: fuocore/qqmusic/models.py
# class QQArtistModel(ArtistModel, QQBaseModel):
#     @classmethod
#     def get(cls, identifier):
#         data_artist = cls._api.artist_detail(identifier)
#         artist = _deserialize(data_artist, QQArtistSchema)
#         artist.cover = cls._api.get_cover(artist.mid, 1)
#         return artist
# 
# class QQSongModel(SongModel, QQBaseModel):
# 
#     @classmethod
#     def get(cls, identifier):
#         data = cls._api.get_song_detail(identifier)
#         song = _deserialize(data, QQSongDetailSchema)
#         return song
# 
#     @property
#     def url(self):
#         if self._url is not None:
#             return self._url
#         url = self._api.get_song_url(self.mid)
#         if url is not None:
#             self._url = url
#         else:
#             self._url = ''
#         return self._url
# 
#     @url.setter
#     def url(self, url):
#         self._url = url
# 
# class QQAlbumModel(AlbumModel, QQBaseModel):
#     @classmethod
#     def get(cls, identifier):
#         data_album = cls._api.album_detail(identifier)
#         album = _deserialize(data_album, QQAlbumSchema)
#         album.cover = cls._api.get_cover(album.mid, 2)
#         return album


from marshmallow import Schema, fields, post_load
from .models import (
    QQArtistModel,
    QQSongModel,
    QQAlbumModel,
)  # noqa
        return QQArtistModel(**data)


class _SongAlbumSchema(Schema):
    identifier = fields.Int(load_from='id', required=True)
    name = fields.Str(load_from='name', required=True)

    @post_load
    def create_model(self, data):
        return QQAlbumModel(**data)


class QQSongSchema(Schema):
    identifier = fields.Int(load_from='songid', required=True)
    mid = fields.Str(load_from='songmid', required=True)
    duration = fields.Float(load_from='interval', required=True)
    title = fields.Str(load_from='songname', required=True)

    artists = fields.List(fields.Nested('_SongArtistSchema'), load_from='singer')

    album_id = fields.Int(load_from='albumid', required=True)
    album_name = fields.Str(load_from='albumname', required=True)

    @post_load
    def create_model(self, data):
        song = QQSongModel(identifier=data['identifier'],
                           mid=data['mid'],
                           duration=data['duration'] * 1000,
                           title=data['title'],
                           artists=data.get('artists'))

# Path: fuocore/qqmusic/models.py
# class QQArtistModel(ArtistModel, QQBaseModel):
#     @classmethod
#     def get(cls, identifier):
#         data_artist = cls._api.artist_detail(identifier)
#         artist = _deserialize(data_artist, QQArtistSchema)
#         artist.cover = cls._api.get_cover(artist.mid, 1)
#         return artist
# 
# class QQSongModel(SongModel, QQBaseModel):
# 
#     @classmethod
#     def get(cls, identifier):
#         data = cls._api.get_song_detail(identifier)
#         song = _deserialize(data, QQSongDetailSchema)
#         return song
# 
#     @property
#     def url(self):
#         if self._url is not None:
#             return self._url
#         url = self._api.get_song_url(self.mid)
#         if url is not None:
#             self._url = url
#         else:
#             self._url = ''
#         return self._url
# 
#     @url.setter
#     def url(self, url):
#         self._url = url
# 
# class QQAlbumModel(AlbumModel, QQBaseModel):
#     @classmethod
#     def get(cls, identifier):
#         data_album = cls._api.album_detail(identifier)
#         album = _deserialize(data_album, QQAlbumSchema)
#         album.cover = cls._api.get_cover(album.mid, 2)
#         return album


# Path: fuocore/qqmusic/schemas.py
from marshmallow import Schema, fields, post_load
from .models import (
    QQArtistModel,
    QQSongModel,
    QQAlbumModel,
)  # noqa

        return QQArtistModel(**data)


class _SongAlbumSchema(Schema):
    identifier = fields.Int(load_from='id', required=True)
    name = fields.Str(load_from='name', required=True)

    @post_load
    def create_model(self, data):
        return QQAlbumModel(**data)


class QQSongSchema(Schema):
    identifier = fields.Int(load_from='songid', required=True)
    mid = fields.Str(load_from='songmid', required=True)
    duration = fields.Float(load_from='interval', required=True)
    title = fields.Str(load_from='songname', required=True)

    artists = fields.List(fields.Nested('_SongArtistSchema'), load_from='singer')

    album_id = fields.Int(load_from='albumid', required=True)
    album_name = fields.Str(load_from='albumname', required=True)

    @post_load
    def create_model(self, data):
        song = QQSongModel(identifier=data['identifier'],
                           mid=data['mid'],
                           duration=data['duration'] * 1000,
                           title=data['title'],
                           artists=data.get('artists'))

        song.album = QQAlbumModel(identifier=data['album_id'],