@dhyasama/totem-models 9.0.0 → 9.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/CapTable.js +12 -19
- package/package.json +1 -1
package/lib/CapTable.js
CHANGED
|
@@ -42,14 +42,21 @@ module.exports = function(mongoose, config) {
|
|
|
42
42
|
|
|
43
43
|
stakeholders: [{
|
|
44
44
|
|
|
45
|
-
// Note that name will always be pulled from sheet and used by default when rendering a cap table.
|
|
46
|
-
// The stakeholder will be programmatically linked to a person or fund in the event of an exact text match on person.name.full or fund.name.
|
|
47
|
-
// Manual creation and linking of stakeholder and entity will happen within Admin.
|
|
48
|
-
// The corollary of this is that neither person nor fund is required and the name from the sheet will be used in their absence.
|
|
49
|
-
|
|
50
45
|
// verbatim text from the cap table
|
|
51
46
|
name: { type: String, trim: true, required: true },
|
|
52
47
|
|
|
48
|
+
rounds: [{
|
|
49
|
+
round: { type: String, trim: true, required: true },
|
|
50
|
+
shares: { type: Number, default: 0 },
|
|
51
|
+
ownership: { type: Number, default: 0 }
|
|
52
|
+
}],
|
|
53
|
+
|
|
54
|
+
// computed on save (via pre-save hook); don't set directly;
|
|
55
|
+
shares: { type: Number, default: 0 },
|
|
56
|
+
|
|
57
|
+
// computed on save (via pre-save hook); don't set directly;
|
|
58
|
+
ownership: { type: Number, default: 0 }
|
|
59
|
+
|
|
53
60
|
// link stakeholder to a fund in our system
|
|
54
61
|
fund: {
|
|
55
62
|
type: Schema.ObjectId,
|
|
@@ -110,18 +117,6 @@ module.exports = function(mongoose, config) {
|
|
|
110
117
|
}
|
|
111
118
|
},
|
|
112
119
|
|
|
113
|
-
rounds: [{
|
|
114
|
-
round: { type: String, trim: true, required: true },
|
|
115
|
-
shares: { type: Number, default: 0 },
|
|
116
|
-
ownership: { type: Number, default: 0 }
|
|
117
|
-
}],
|
|
118
|
-
|
|
119
|
-
// computed on save (via pre-save hook); don't set directly;
|
|
120
|
-
shares: { type: Number, default: 0 },
|
|
121
|
-
|
|
122
|
-
// computed on save (via pre-save hook); don't set directly;
|
|
123
|
-
ownership: { type: Number, default: 0 }
|
|
124
|
-
|
|
125
120
|
}],
|
|
126
121
|
|
|
127
122
|
entered: {
|
|
@@ -131,8 +126,6 @@ module.exports = function(mongoose, config) {
|
|
|
131
126
|
|
|
132
127
|
});
|
|
133
128
|
|
|
134
|
-
|
|
135
|
-
|
|
136
129
|
///////////////////////////////////////////////////////////////////////////////////////
|
|
137
130
|
// VIRTUALS
|
|
138
131
|
// Properties that are not persisted to the database
|