Init schema
This commit is contained in:
parent
ea435a210b
commit
0f0be6ec14
1 changed files with 12 additions and 0 deletions
12
src/schema.ts
Normal file
12
src/schema.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import mongoose, { Document, Schema, Types } from 'mongoose'
|
||||
|
||||
const UrlSchema: Schema = new Schema({
|
||||
url: String
|
||||
})
|
||||
|
||||
export type UrlModel = Document & {
|
||||
_id: Types.ObjectId,
|
||||
url: string
|
||||
}
|
||||
|
||||
export default mongoose.model<UrlModel>('urls', UrlSchema, 'urls')
|
||||
Loading…
Reference in a new issue