Download pool/shard010/JavaScript/0062765_article.js from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 840 Bytes
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard010/JavaScript/0062765_article.js
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard010/JavaScript/0062765_article.js
-
curl -L -o 0062765_article.js https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard010/JavaScript/0062765_article.js
840 Bytes
| // Example model | |
| var mongoose = require('mongoose'), | |
| Schema = mongoose.Schema; | |
| var ArticleSchema = new Schema({ | |
| title: { | |
| type: String, | |
| 'default': '' | |
| }, | |
| content: { | |
| type: String, | |
| 'default': '' | |
| }, | |
| author: { | |
| type: mongoose.Schema.ObjectId, | |
| required: true, | |
| ref: 'User' | |
| }, | |
| members: [{ | |
| type: mongoose.Schema.ObjectId, | |
| ref: 'User' | |
| }], | |
| createdAt: { | |
| type: Date, | |
| 'default': Date.now | |
| }, | |
| updatedAt: { | |
| type: Date, | |
| 'default': Date.now | |
| }, | |
| trashed: { | |
| type: Boolean, | |
| required: true, | |
| 'default': false | |
| } | |
| }); | |
| ArticleSchema.pre('save', function(next){ | |
| this.updatedAt = new Date(); | |
| next(); | |
| }); | |
| module.exports = mongoose.model('Article', ArticleSchema); | |