mirror of
https://github.com/Alvin-Zilverstand/challenge-11.git
synced 2026-03-06 13:21:54 +01:00
Remove index.html, styles.css, favicon.svg, script.js, and tailwind.config.js files to streamline the project and eliminate unused resources.
This commit is contained in:
32
models/Customer.js
Normal file
32
models/Customer.js
Normal file
@@ -0,0 +1,32 @@
|
||||
const mongoose = require('mongoose');
|
||||
|
||||
const customerSchema = new mongoose.Schema({
|
||||
name: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
email: {
|
||||
type: String,
|
||||
required: true,
|
||||
unique: true
|
||||
},
|
||||
phone: {
|
||||
type: String
|
||||
},
|
||||
carDetails: {
|
||||
make: String,
|
||||
model: String,
|
||||
year: Number,
|
||||
modifications: [String]
|
||||
},
|
||||
createdAt: {
|
||||
type: Date,
|
||||
default: Date.now
|
||||
},
|
||||
updatedAt: {
|
||||
type: Date,
|
||||
default: Date.now
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = mongoose.model('Customer', customerSchema);
|
||||
Reference in New Issue
Block a user