{"size": 777, "ext": "js", "max_stars_repo_path": "server/model/comment.js", "max_stars_repo_name": "1181649328/Blog2.0", "max_stars_repo_stars_event_min_datetime": "2020-05-14T07:04:02.000Z", "max_stars_repo_stars_event_max_datetime": "2021-05-10T01:29:43.000Z", "max_issues_repo_path": "server/model/comment.js", "max_issues_repo_name": "1181649328/Blog2.0", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "server/model/comment.js", "max_forks_repo_name": "1181649328/Blog2.0", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 20, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 15.8571428571, "max_line_length": 51, "alphanum_fraction": 0.5341055341}
const mongoose = require("mongoose");
const Schema = new mongoose.Schema({
  avtor: {
    type: String,
  },
  content: {
    type: String,
  },
  name: {
    type: String,
  },
  email: {
    type: String,
  },
  site: {
    type: String,
  },
  blogId: {
    type: String,
  },
  isauthorsComment: {
    type: Boolean,
    default: false,
  },
  istopComment: {
    type: Boolean,
    default: true,
  },
  replyId: [
    {
      type: mongoose.SchemaTypes.ObjectId,
      ref: "Comment",
    },
  ],
  createTime: {
    type: String,
    default: () => {
      return new Date().toLocaleString();
    },
  },
  upDateTime: {
    type: String,
    default: () => {
      return new Date().toLocaleString();
    },
  },
});
module.exports = mongoose.model("Comment", Schema);
