'use strict';

app.service('Rooms', function(){

  this.generateOne = function() {
    var id = uuid.v4(),
        name = id.substring(32,36).toUpperCase();

    return {
      id: id,
      name: 'Room ' + name,
      main: { punch: -1 },
      bstations: [{ id: uuid.v4(), name: 'Controller ' + name, type: 'HCM-C1'}],
      devices: [] 
    };
  };

  this.generateBstation = function() {
    var id = uuid.v4();
    return {id: id, name: 'Controller ' + id.substring(32,36).toUpperCase(), type: 'HCM-C1'};
  };

});