Implemented remaining core features
This commit is contained in:
20
rpg-docs/Model/Character/Levels/Classes.js
Normal file
20
rpg-docs/Model/Character/Levels/Classes.js
Normal file
@@ -0,0 +1,20 @@
|
||||
Classes = new Meteor.Collection("classes");
|
||||
|
||||
Schemas.Class = new SimpleSchema({
|
||||
charId: {type: String, regEx: SimpleSchema.RegEx.Id},
|
||||
name: {type: String},
|
||||
createdAt: {
|
||||
type: Date,
|
||||
autoValue: function() {
|
||||
if (this.isInsert) {
|
||||
return new Date;
|
||||
} else if (this.isUpsert) {
|
||||
return {$setOnInsert: new Date};
|
||||
} else {
|
||||
this.unset();
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Classes.attachSchema(Schemas.Class);
|
||||
Reference in New Issue
Block a user