const getConnection = require('../queries/_connection'); //конекты с базой
function Task(id, message, created, finished, cancelled) {
this.Id = id;
this.Message = message;
this.Created = created || new Date();
this.Finished = finished || null;
this.Cancelled = cancelled || null;
}
Task.FromObject = function(data) {
return new Task(
data.Id,
data.Message,
data.Created,
data.Finished,
data.Cancelled
);
}
function Task(id, message, created, finished, cancelled) {
this.Id = id;
this.Message = message;
this.Created = created || new Date();
this.Finished = finished || null;
this.Cancelled = cancelled || null;
}
Task.FromObject = function(data) {
return new Task(
data.Id,
data.Message,
data.Created,
data.Finished,
data.Cancelled
);
}