feat: added warehouse image management apis

This commit is contained in:
Sathishkumar Krishnan
2022-03-01 01:59:03 +05:30
parent 82801f6ccb
commit adc3c0b284
3 changed files with 77 additions and 1 deletions

View File

@@ -1,5 +1,12 @@
const mongoose = require("mongoose");
const WarehouseImage = new mongoose.Schema({
url: {
type: String,
trim: true,
},
});
const schema = new mongoose.Schema(
{
name: {
@@ -16,6 +23,7 @@ const schema = new mongoose.Schema(
type: String,
trim: true,
},
images: [WarehouseImage],
company_id: {
type: mongoose.Schema.Types.ObjectId,
ref: "Company",