Untitled
Anonymous
plain_text
12/08/2022 6:39 PM
660 B
19
Indexable
import {Schema, model} from "mongoose";
const customerSchema = new Schema({
customer: {type: Number, required: true, unique: true},
name: {type: String, required: true},
lastname: {type: String, required: true},
birthday: {type: Date, required: true},
address: {type: String, required: true},
city: {type: String, required: true},
phone: {type: Number, required: true},
},{versionKey: false});
export default model("customer", customerSchema, "customer");Editor is loading...