payservedb 8.1.3 → 8.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -94,6 +94,7 @@ const models = {
94
94
  LevyType: require("./src/models/levytype"),
95
95
  LevyContract: require("./src/models/levycontract"),
96
96
  Invoice: require("./src/models/invoice"),
97
+ ShortUrl: require("./src/models/short_urls"),
97
98
  InvoicingSchedule: require("./src/models/invoicing_schedule"),
98
99
  Reminder: require("./src/models/reminder"),
99
100
  Penalty: require("./src/models/penalty"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payservedb",
3
- "version": "8.1.3",
3
+ "version": "8.1.5",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -0,0 +1,21 @@
1
+ const mongoose = require('mongoose');
2
+
3
+ const shortUrlSchema = new mongoose.Schema({
4
+ shortCode: {
5
+ type: String,
6
+ required: true,
7
+ unique: true,
8
+ trim: true
9
+ },
10
+ originalUrl: {
11
+ type: String,
12
+ required: true,
13
+ trim: true
14
+ }
15
+ }, {
16
+ timestamps: true
17
+ });
18
+
19
+ const ShortUrl = mongoose.model('ShortUrl', shortUrlSchema);
20
+
21
+ module.exports = ShortUrl;