File size: 767 Bytes
9470e9f c7352f9 9470e9f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
import mongoose from 'mongoose';
const supportTicketSchema = new mongoose.Schema(
{
email: {
type: String,
required: true,
trim: true,
},
category: {
type: String,
enum: ['General Inquiry', 'Report a User', 'Bug Report', 'Account Issue', 'Influencer Application'],
default: 'General Inquiry',
},
message: {
type: String,
required: true,
},
user: {
type: mongoose.Schema.Types.ObjectId,
ref: 'User',
required: false, // allow non-logged-in contact if needed later
},
status: {
type: String,
enum: ['open', 'resolved'],
default: 'open',
},
},
{ timestamps: true }
);
export default mongoose.model('SupportTicket', supportTicketSchema);
|