diff --git a/src/config/constants.js b/src/config/constants.js index 93c794b..304a435 100644 --- a/src/config/constants.js +++ b/src/config/constants.js @@ -13,33 +13,14 @@ const UserActions = [ ]; const LevelPositions = [ - "B", - "D", - "DB", - "DF", - "F", - "L", - "LB", - "LD", "LDB", "LDF", - "LF", - "LU", "LUB", "LUF", - "R", - "RB", - "RD", "RDB", "RDF", - "RF", - "RU", "RUB", "RUF", - "U", - "UB", - "UF", - "W", ]; const InventoryScopes = ["Inventory", "Material", "Item"]; diff --git a/src/models/Level.js b/src/models/Level.js index 857b561..4e0dee5 100644 --- a/src/models/Level.js +++ b/src/models/Level.js @@ -27,13 +27,14 @@ const schema = new mongoose.Schema( type: { required: true, type: String, - enum: SubLevelTypes - }, - postition: { - required: true, - type: String, - enum: LevelPositions, + enum: SubLevelTypes, }, + postition: [ + { + type: String, + enum: LevelPositions, + }, + ], sub_level_id: { required: true, type: mongoose.Schema.Types.ObjectId, diff --git a/src/models/Sublevel.js b/src/models/Sublevel.js index 465de94..b9cde4e 100644 --- a/src/models/Sublevel.js +++ b/src/models/Sublevel.js @@ -39,11 +39,12 @@ const schema = new mongoose.Schema( type: String, enum: SubLevelTypes, }, - postition: { - required: true, - type: String, - enum: LevelPositions, - }, + postitions: [ + { + type: String, + enum: LevelPositions, + }, + ], sub_level_id: { required: true, type: mongoose.Schema.Types.ObjectId, @@ -55,11 +56,11 @@ const schema = new mongoose.Schema( type: Boolean, default: false, }, - inventory: [ - { - type: mongoose.Schema.Types.ObjectId, - ref: "Inventory", - }, + preffered_inventory: [ + // { + // type: mongoose.Schema.Types.ObjectId, + // ref: "Inventory", + // }, ], }, {