POS_node/models/Collection.js

31 lines
526 B
JavaScript

import mongoose from "mongoose";
const CollectionSchema = mongoose.Schema(
{
name: {
type: String,
// required: true,
},
created_by: {
type: mongoose.Schema.Types.ObjectId,
ref: "User",
},
header: [
{
key: {
type: String,
},
value: {
type: String,
},
//required: true,
},
],
},
{ timestamps: true }
);
const Collection = mongoose.model("Collection", CollectionSchema);
export default Collection;