somewhere

This commit is contained in:
Swift
2023-08-17 13:05:51 +03:30
parent 30c7eb0e7b
commit 53843207cc
429 changed files with 117489 additions and 1 deletions
+36
View File
@@ -0,0 +1,36 @@
const mongoose = require('mongoose')
const BufferRequestSchema = mongoose.Schema({
// system structure
_openedBy: { type: mongoose.ObjectId, ref: 'User' },
_updatedBy: { type: mongoose.ObjectId, ref: 'User' },
user_id: { type: mongoose.ObjectId, ref: 'User' },
agent_id: { type: mongoose.ObjectId, ref: 'Representation' },
// form info
description: String,
createDate: String,
sendDate: String,
trackingCode: String,
items: [
{
ItemName: String,
ItemID: String,
ItemCode: String,
bufferQuantity: Number
}
],
// admin operations
seen: { type: Boolean, default: false },
status: { type: String, enum: ['temp', 'sent', 'ongoing', 'waiting', 'delivered'], default: 'temp' },
statusHistory: [
{
status: String,
date: Number
}
],
deliveryCode: String
})
module.exports = mongoose.model('BufferRequest', BufferRequestSchema)