This commit is contained in:
oitsjustjose 2020-10-16 01:31:59 -05:00
commit 25f973e2b3
37 changed files with 812 additions and 470 deletions

View file

@ -0,0 +1,17 @@
import mongoose, { Document, Schema, Types } from 'mongoose'
import shortid from 'shortid'
const UrlSchema: Schema = new Schema({
_id: {
type: String,
default: shortid.generate
},
url: String
})
export type UrlModel = Document & {
_id: string,
url: string
}
export default mongoose.model<UrlModel>('urls', UrlSchema, 'urls')