hardlounge/lib/models.js
Mattias Erming 4cc34d6456 Refactoring
2014-03-06 07:11:25 -08:00

37 lines
546 B
JavaScript

var models = exports;
var id = 0;
models.Network = function() {
this.id = id++;
this.address = "";
this.nick = "";
this.channels = [];
};
models.Channel = function() {
this.id = id++;
this.name = "";
this.type = "channel";
this.topic = "";
this.users = [];
this.messages = [];
};
models.User = function() {
this.id = id++;
this.name = "";
};
models.Message = function() {
this.text = "";
this.time = "";
this.user = "";
};
models.Event = function() {
this.action = "";
this.data = "";
this.target = "";
this.type = "";
};