This repository has been archived by the owner on Oct 25, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFoo.js
108 lines (91 loc) · 1.52 KB
/
Foo.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
"use strict";
const Entity = require("../../lib/Entity");
module.exports = class Foo extends Entity {
constructor(config)
{
super(config);
}
initDefaults()
{
super.initDefaults();
this.name = "foo";
this.created = new Date();
this.entity = new Entity();
this.entities = [];
this.simpleObjects = ["a", "b"];
this.myMap = new Map();
this.myMap.set("test", 2);
this.enabled = true;
}
set myMap(x)
{
if(Array.isArray(x))
{
this._myMap = new Map(x);
}
else
{
this._myMap = x;
}
}
get myMap()
{
return this._myMap;
}
set simpleObjects(x)
{
this._simpleObjects = x;
}
get simpleObjects()
{
return this._simpleObjects;
}
set entities(x)
{
this._entities = x;
}
get entities()
{
return this._entities;
}
set entity(x)
{
this._entity = x;
}
get entity()
{
return this._entity;
}
set created(x)
{
this._created = x;
}
get created()
{
return this._created;
}
set name(x)
{
this._name = x;
}
get name()
{
return this._name;
}
set enabled(x)
{
this._enabled = x;
}
get enabled()
{
return this._enabled;
}
set obj(x)
{
this._obj = x;
}
get obj()
{
return this._obj;
}
};