diff options
Diffstat (limited to 'db')
| -rw-r--r-- | db/url-schema.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/db/url-schema.js b/db/url-schema.js new file mode 100644 index 0000000..8392e3d --- /dev/null +++ b/db/url-schema.js @@ -0,0 +1,14 @@ +const mongoose = require('mongoose'); + +const UrlSchema = new mongoose.Schema({ + slug: { + type: mongoose.SchemaTypes.String, + required: true + }, + url: { + type: mongoose.SchemaTypes.String, + required: true + } +}); + +module.exports = mongoose.model('Url', UrlSchema); |
