#ifndef RECORD_H
#define RECORD_H

#include <QDateTime>
#include "musicobject.h"

class Song;
class Artist;

/**
 * Represents a record made by an artist
 */
class MUSICLIBRARYSHARED_EXPORT Record : public MusicObject
{
    Q_OBJECT

public:

    /**
     * Creates an record and assigns it to given artist.
     * The artist becomes the parent of this in QT object hierarchy.
     */
    Record(Artist *artist);

    /**
     * Deletes record and all songs it owns
     */
    ~Record();

    /**
     * Gets the parent artist
     */
    Artist *artist();

    /**
     * Sets release date of record
     */
    void setReleaseDate(const QDateTime &releaseDate);

    /**
     * Gets release date
     */
    QDateTime releaseDate() const;

    /**
     * Sets cover art file name
     */
    void setCoverArtFile(const QString &fileName);

    /**
     * Gets cover art file name
     */
    QString coverArtFile() const;

    /**
     * Gets a list of songs
     */
    QList<Song *> songs() const;
};

#endif // RECORD_H
