1234567891011121314151617181920212223242526272829303132333435 |
- import mongoose from 'mongoose';
- const { Schema } = mongoose;
- const appData = {
- msgId: {
- type: String,
- required: true,
- },
- msgLogDateTime: {
- type: Date,
- required: true,
- default: () => Date.now()
- },
- msgDateTime: {
- type: Date,
- required: true,
- default: () => Date.now()
- },
- msgTag: [String],
- msgPayload: {
- type: String,
- required: true
- }
- }
- const messageSchema = new mongoose.Schema({
- appLogLocId: {
- type: String,
- ref: `appLogLoc`,
- required: true
- },
- appData: appData
- });
- module.exports = messageSchema
|