import { Schema, model } from "mongoose"; const mailSchema = new Schema( { fullname: { type: String, required: true, }, // String is shorthand for {type: String} email: { type: String, required: true, }, company: { type: String, }, phone: { type: String, }, }, { timestamps: true, toJSON: { virtuals: true }, toObject: { virtuals: true }, } ); const Mail = model("Mail", mailSchema); export default Mail;