{"size": 497, "ext": "js", "max_stars_repo_path": "backend/models/User.js", "max_stars_repo_name": "WarrenMfg/dev-connector", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "backend/models/User.js", "max_issues_repo_name": "WarrenMfg/dev-connector", "max_issues_repo_issues_event_min_datetime": "2021-03-10T19:55:28.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-02T11:47:48.000Z", "max_forks_repo_path": "backend/models/User.js", "max_forks_repo_name": "WarrenMfg/dev-connector", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 3, "max_forks_count": null, "avg_line_length": 15.0606060606, "max_line_length": 48, "alphanum_fraction": 0.6076458753}
import mongoose from 'mongoose';


const UserSchema = new mongoose.Schema({
  // same as Profile.slug
  userName: {
    type: String,
    required: true
  },
  email: {
    type: String,
    required: true
  },
  password: {
    type: String,
    required: true
  },
  avatar: {
    type: String,
    required: true
  },
  isLoggedIn: {
    type: Boolean,
    required: true,
    default: false
  }
},
{
  timestamps: true
});

const User = mongoose.model('User', UserSchema);
export default User;