Admin interface to review, filter, and batch-invite the 95 pre-registrants from Baby Ghosts. Accept-invitation page pre-fills their data and collects circle, pronouns, motivation, contribution tier, and agreement before creating their member record.
32 lines
870 B
JavaScript
32 lines
870 B
JavaScript
import mongoose from "mongoose";
|
|
|
|
const preRegistrationSchema = new mongoose.Schema(
|
|
{
|
|
email: {
|
|
type: String,
|
|
required: true,
|
|
unique: true,
|
|
lowercase: true,
|
|
trim: true,
|
|
},
|
|
name: String,
|
|
city: String,
|
|
role: String, // professional role (e.g. "3D artist") — admin-only reference
|
|
newsletterOptIn: Boolean,
|
|
status: {
|
|
type: String,
|
|
enum: ["pending", "selected", "invited", "accepted", "expired"],
|
|
default: "pending",
|
|
},
|
|
inviteEmailSentAt: Date,
|
|
acceptedAt: Date,
|
|
memberId: { type: mongoose.Schema.Types.ObjectId, ref: "Member" },
|
|
magicLinkJti: String,
|
|
magicLinkJtiUsed: { type: Boolean, default: false },
|
|
adminNotes: String,
|
|
},
|
|
{ timestamps: true }
|
|
);
|
|
|
|
export default mongoose.models.PreRegistration ||
|
|
mongoose.model("PreRegistration", preRegistrationSchema);
|