Modified: Level positions

This commit is contained in:
Llewellyn D'souza
2021-12-29 14:36:28 +05:30
parent 806cfefba3
commit 66ac295bdc
3 changed files with 18 additions and 35 deletions

View File

@@ -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"];

View File

@@ -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,

View File

@@ -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",
// },
],
},
{