{"size": 732, "ext": "js", "max_stars_repo_path": "express/models/Post.js", "max_stars_repo_name": "feiyangfan/MyCampsite", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "express/models/Post.js", "max_issues_repo_name": "feiyangfan/MyCampsite", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "express/models/Post.js", "max_forks_repo_name": "feiyangfan/MyCampsite", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 48.8, "max_line_length": 190, "alphanum_fraction": 0.6803278689}
import mongoose from "mongoose";

const PostSchema = mongoose.Schema({
  siteId: {type: mongoose.Schema.Types.ObjectId, ref: "Site", required: true},
  notes: {type: String, maxLength: 280},
  weatherTemp: {type: Number}, // in degrees celsius 
  weatherDesc: {type: String, enum: ["Clear", "Rain", "Clouds", "Snow", "Thunderstorm", "Drizzle", "Atmosphere", "Mist", "Smoke", "Haze", "Dust", "Fog", "Sand", "Ash", "Squall", "Tornado"]},
  profile: {type: mongoose.Schema.Types.ObjectId, ref: "PublicProfile", required: true},
  file: {type: String, required: true},
  thumbnailFile: {type: String, required: true},
  finishDate: {type: Date, default: null}
}, {timestamps: true});

export default mongoose.model("Post", PostSchema);
