17 lines
No EOL
363 B
JavaScript
17 lines
No EOL
363 B
JavaScript
import mongoose from "mongoose"
|
|
|
|
|
|
const TransactionSchema = new mongoose.Schema(
|
|
{
|
|
userId: String,
|
|
cost: String,
|
|
products: {
|
|
type: [mongoose.Types.ObjectId],
|
|
of: Number,
|
|
},
|
|
},
|
|
{timestamps: true}
|
|
);
|
|
|
|
const Transaction = mongoose.model("Transaction", TransactionSchema);
|
|
export default Transaction |