Restrudturing app + ES6 + Init socket + Init models

This commit is contained in:
Bruno SIMON
2016-06-02 19:49:00 +02:00
parent 5697cf1b8e
commit 0c2955c01b
9 changed files with 474 additions and 71 deletions
+34
View File
@@ -0,0 +1,34 @@
'use strict'
class File
{
constructor( _name, _content )
{
// Set up
this.name = _name
this.versions = []
// Create first version
if( typeof _content !== 'undefined' )
this.create_version( _content )
}
create_version( content )
{
// Create version
let version = {}
// Set up
version.date = new Date()
version.content = content
this.versions.push( version )
}
destructor()
{
console.log( 'destruct' )
}
}
module.exports = File