#include "UserInfoModel.h"

#include <QQmlEngine>

UserInfoModel* UserInfoModel::pInstance = nullptr;

UserInfoModel::UserInfoModel(QObject *parent)
    : QObject(parent)
{

}

UserInfoModel::~UserInfoModel()
{

}

UserInfoModel *UserInfoModel::instance()
{
    if (!pInstance) {
        pInstance = new UserInfoModel(nullptr);
    }
    return pInstance;
}

UserInfoModel *UserInfoModel::create(QQmlEngine *engine, QJSEngine *)
{
    engine->setObjectOwnership(instance(), QQmlEngine::CppOwnership);
    return instance();
}
