Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/model.3/common/
Upload File :
Current File : /home/infinitibizsol/.trash/model.3/common/address.js

import mongoose from "mongoose";

const Address = new mongoose.Schema(
  {
    street: { type: String, required: false, default: "" },
    apt_or_suite: { type: String, required: false, default: "" },
    city: { type: String, required: false, default: "" },
    province: { type: String, required: false, default: "" },
    country: { type: String, default: "United States" },
    county: { type: String, default: "" },
    zip_code: { type: Number, required: false, default: 0 },
    address_type: { type: String, default: "Mailing" },
    primary_address: { type: Boolean, default: false },
    comments: { type: String, required: false, default: "" },
    contact_id: {
      type: mongoose.Schema.ObjectId,
      ref: "Contact",
    },
    user_id: {
      type: mongoose.Schema.ObjectId,
      ref: "User",
    },

    createdOn: { type: Date, default: Date.now },
    modifiedOn: { type: Date, default: Date.now },
  },
  {
    toJSON: { virtuals: true },
    toObject: { virtuals: true },
  }
);

export default mongoose.model("Address", Address);

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists