mirror of
https://github.com/Alvin-Zilverstand/challenge-11.git
synced 2026-03-06 13:21:54 +01:00
14 lines
481 B
JavaScript
14 lines
481 B
JavaScript
const mongoose = require('mongoose');
|
|
|
|
const modificationSchema = new mongoose.Schema({
|
|
name: { type: String, required: true },
|
|
description: { type: String, required: true },
|
|
price: { type: Number, required: true },
|
|
category: { type: String, required: true },
|
|
icon: { type: String }, // optional: path to SVG/icon
|
|
createdAt: { type: Date, default: Date.now }
|
|
});
|
|
|
|
const Modification = mongoose.model('Modification', modificationSchema);
|
|
|
|
module.exports = Modification;
|