Added: 2 way binding for data models
This commit is contained in:
@@ -16,6 +16,10 @@ const schema = new mongoose.Schema(
|
|||||||
type: String,
|
type: String,
|
||||||
trim: true,
|
trim: true,
|
||||||
},
|
},
|
||||||
|
zone_id: {
|
||||||
|
type: mongoose.Schema.Types.ObjectId,
|
||||||
|
ref: "Zone",
|
||||||
|
},
|
||||||
rows: [
|
rows: [
|
||||||
{
|
{
|
||||||
type: mongoose.Schema.Types.ObjectId,
|
type: mongoose.Schema.Types.ObjectId,
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ const schema = new mongoose.Schema(
|
|||||||
type: String,
|
type: String,
|
||||||
trim: true,
|
trim: true,
|
||||||
},
|
},
|
||||||
|
row_id: {
|
||||||
|
type: mongoose.Schema.Types.ObjectId,
|
||||||
|
ref: "Row",
|
||||||
|
},
|
||||||
levels: [
|
levels: [
|
||||||
{
|
{
|
||||||
type: mongoose.Schema.Types.ObjectId,
|
type: mongoose.Schema.Types.ObjectId,
|
||||||
|
|||||||
@@ -30,6 +30,10 @@ const schema = new mongoose.Schema(
|
|||||||
min: 1, // Level is at 0
|
min: 1, // Level is at 0
|
||||||
max: 5,
|
max: 5,
|
||||||
},
|
},
|
||||||
|
bay_id: {
|
||||||
|
type: mongoose.Schema.Types.ObjectId,
|
||||||
|
ref: "Bay",
|
||||||
|
},
|
||||||
sub_level_id: {
|
sub_level_id: {
|
||||||
required: true,
|
required: true,
|
||||||
type: mongoose.Schema.Types.ObjectId,
|
type: mongoose.Schema.Types.ObjectId,
|
||||||
|
|||||||
@@ -16,6 +16,10 @@ const schema = new mongoose.Schema(
|
|||||||
type: String,
|
type: String,
|
||||||
trim: true,
|
trim: true,
|
||||||
},
|
},
|
||||||
|
area_id: {
|
||||||
|
type: mongoose.Schema.Types.ObjectId,
|
||||||
|
ref: "Area",
|
||||||
|
},
|
||||||
bays: [
|
bays: [
|
||||||
{
|
{
|
||||||
type: mongoose.Schema.Types.ObjectId,
|
type: mongoose.Schema.Types.ObjectId,
|
||||||
|
|||||||
@@ -16,6 +16,10 @@ const schema = new mongoose.Schema(
|
|||||||
type: String,
|
type: String,
|
||||||
trim: true,
|
trim: true,
|
||||||
},
|
},
|
||||||
|
company_id: {
|
||||||
|
type: mongoose.Schema.Types.ObjectId,
|
||||||
|
ref: "Company",
|
||||||
|
},
|
||||||
zones: [
|
zones: [
|
||||||
{
|
{
|
||||||
type: mongoose.Schema.Types.ObjectId,
|
type: mongoose.Schema.Types.ObjectId,
|
||||||
|
|||||||
@@ -16,6 +16,10 @@ const schema = new mongoose.Schema(
|
|||||||
type: String,
|
type: String,
|
||||||
trim: true,
|
trim: true,
|
||||||
},
|
},
|
||||||
|
warehouse_id: {
|
||||||
|
type: mongoose.Schema.Types.ObjectId,
|
||||||
|
ref: "Warehouse",
|
||||||
|
},
|
||||||
areas: [
|
areas: [
|
||||||
{
|
{
|
||||||
type: mongoose.Schema.Types.ObjectId,
|
type: mongoose.Schema.Types.ObjectId,
|
||||||
|
|||||||
Reference in New Issue
Block a user