mirror of
https://github.com/FranP-code/shortly.git
synced 2025-10-13 00:43:28 +00:00
added metadata on url model
This commit is contained in:
@@ -5,6 +5,7 @@ export interface IUrl {
|
||||
url: string
|
||||
dateCreated: Date
|
||||
uploadedByUser: string
|
||||
metaData: Object
|
||||
}
|
||||
|
||||
export const urlSchema = new Schema<IUrl>(
|
||||
@@ -27,6 +28,10 @@ export const urlSchema = new Schema<IUrl>(
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
metaData: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
{ collection: 'url', timestamps: true }
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user