{"size": 461, "ext": "js", "max_stars_repo_path": "server/models/action.js", "max_stars_repo_name": "nlicalzi/jello-task-manajer", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "server/models/action.js", "max_issues_repo_name": "nlicalzi/jello-task-manajer", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "server/models/action.js", "max_forks_repo_name": "nlicalzi/jello-task-manajer", "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": 21.9523809524, "max_line_length": 62, "alphanum_fraction": 0.6572668113}
const mongoose = require('mongoose');

const { Schema } = mongoose;

const ActionSchema = new Schema({
  description: {
    type: String,
    required: [true, 'The action must have some description'],
  },
  cardId: {
    type: Schema.Types.ObjectId,
    ref: 'Card',
    required: [true, 'The comment must belong to a card'],
  },
  versionKey: false,
}, { timestamps: true });

const Action = mongoose.model('Action', ActionSchema);

module.exports = Action;
