profile.js 578 B

1234567891011121314151617181920212223242526272829303132
  1. import mongoose from "mongoose";
  2. const profileSchema = mongoose.Schema({
  3. user: {
  4. ref: "user",
  5. type: mongoose.Schema.Types.ObjectId,
  6. },
  7. bio: { type: String, default: "" },
  8. age: { type: Number, default: ""},
  9. contacts: {
  10. youtube: {
  11. type: String,
  12. default: '',
  13. },
  14. facebook: {
  15. type: String,
  16. default: '',
  17. },
  18. linkedin: {
  19. type: String,
  20. default: '',
  21. },
  22. instagram: {
  23. type: String,
  24. default: '',
  25. },
  26. },
  27. });
  28. const Profile = mongoose.model("profile", profileSchema);
  29. export default Profile;