Initial commit
This commit is contained in:
11
server/models/EmailTemplate.js
Normal file
11
server/models/EmailTemplate.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const mongoose = require('mongoose');
|
||||
|
||||
const emailTemplateSchema = new mongoose.Schema({
|
||||
name: { type: String, required: true, unique: true }, // Welcome, Order Confirmation, Order Shipped, Password Reset, Low Stock, Contact Form
|
||||
subject: { type: String, required: true },
|
||||
bodyHtml: { type: String, required: true },
|
||||
placeholders: [{ type: String }] // e.g. ['{{customerName}}', '{{orderId}}', '{{orderTotal}}']
|
||||
}, { timestamps: true });
|
||||
|
||||
module.exports = mongoose.model('EmailTemplate', emailTemplateSchema);
|
||||
|
||||
Reference in New Issue
Block a user