Skip to content

Instantly share code, notes, and snippets.

@Zyst
Created September 29, 2016 15:08
Show Gist options
  • Save Zyst/f3c6e5a0a2095284f18bd60d01bbf5d8 to your computer and use it in GitHub Desktop.
Save Zyst/f3c6e5a0a2095284f18bd60d01bbf5d8 to your computer and use it in GitHub Desktop.
import mongoose, { Schema } from 'mongoose';
const StepSchema = new mongoose.Schema({
name: { type: String, required: true },
description: String,
position: { type: Number, required: true },
date_added: { type: Date, default: Date.now },
date_modified: { type: Date, default: Date.now },
templates: [{ type: Schema.Types.ObjectId, ref: 'Template' }],
active: { type: Boolean, default: true },
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment