20 lines
321 B
JavaScript
20 lines
321 B
JavaScript
|
const Allocation = function () {
|
||
|
this.ip = null;
|
||
|
this.port = null;
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* Return a new allocation model.
|
||
|
*
|
||
|
* @param obj
|
||
|
* @returns {Allocation}
|
||
|
*/
|
||
|
Allocation.prototype.fill = function (obj) {
|
||
|
this.ip = obj.ip || null;
|
||
|
this.port = obj.port || null;
|
||
|
|
||
|
return this;
|
||
|
};
|
||
|
|
||
|
export default Allocation;
|