mirror of
https://github.com/Alvin-Zilverstand/challenge-11.git
synced 2026-03-06 11:06:21 +01:00
Enhance CarModifications component by integrating API calls for fetching modifications and customers, implementing a dialog for adding modifications to customers, and improving error and success message handling. Refactor state management and UI elements for better user experience.
This commit is contained in:
14
models/Modification.js
Normal file
14
models/Modification.js
Normal file
@@ -0,0 +1,14 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user