cragy-api / src /models /SupportTicket.js
ShieldX's picture
Update src/models/SupportTicket.js
c7352f9 verified
raw
history blame contribute delete
767 Bytes
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);