define([
	'User',
	'Global'
],
    function (user, Global) {
        'use strict';
        var SchedulingResourceDirectory = Backbone.Model.extend({
                initialize: function () {
                    this.url = user.get("scheduling-resource-directory").href;
                    this.fetch({
	                    async: false,
	                    cache: false
                    });
                    Global.getUtilities().flattenLinks(this);
                }
            });

        SchedulingResourceDirectory.singleInstance = null;

        SchedulingResourceDirectory.instance = function () {
            SchedulingResourceDirectory.singleInstance = SchedulingResourceDirectory.singleInstance || new SchedulingResourceDirectory();
            return SchedulingResourceDirectory.singleInstance;
        };

        return SchedulingResourceDirectory;
    }
);