Created
April 11, 2018 08:15
-
-
Save muhsin-k/262c43578f1c4b7a2586eeb450b6d43e to your computer and use it in GitHub Desktop.
URL-Shortener
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose = require("mongoose"); | |
const { Schema } = mongoose; | |
const urlShortenSchema = new Schema({ | |
originalUrl: String, | |
urlCode: String, | |
shortUrl: String, | |
createdAt: { type: Date, default: Date.now }, | |
updatedAt: { type: Date, default: Date.now } | |
}); | |
mongoose.model("UrlShorten", urlShortenSchema); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment