Expanded mongo model

This commit is contained in:
2022-03-14 01:41:52 +03:00
parent beb5ff052f
commit 946a9afeac
5 changed files with 38 additions and 14 deletions

View File

@@ -1,8 +1,13 @@
const Part = require('./Part')
function capitalize (string) {
return string.charAt(0).toUpperCase() + string.slice(1)
}
module.exports = class Item {
constructor (name) {
this.name = name
this.fullName = capitalize(name) + ' Prime'
this.set = new Part(name, 'set')
this.parts = []