Files
estate-landing-page/server/models/Mail.js
T
2023-04-18 19:31:30 +05:00

30 lines
496 B
JavaScript

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;