Use ShortId in the Url object schema
This commit is contained in:
parent
0cea1dcf76
commit
5a832c1f72
1 changed files with 2 additions and 0 deletions
|
|
@ -1,11 +1,13 @@
|
||||||
import mongoose, { Document, Schema, Types } from 'mongoose'
|
import mongoose, { Document, Schema, Types } from 'mongoose'
|
||||||
|
|
||||||
const UrlSchema: Schema = new Schema({
|
const UrlSchema: Schema = new Schema({
|
||||||
|
shortid: String,
|
||||||
url: String
|
url: String
|
||||||
})
|
})
|
||||||
|
|
||||||
export type UrlModel = Document & {
|
export type UrlModel = Document & {
|
||||||
_id: Types.ObjectId,
|
_id: Types.ObjectId,
|
||||||
|
shortid: string,
|
||||||
url: string
|
url: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue