keep timestamps for config objects
This commit is contained in:
parent
c9d73702c7
commit
37e794701c
1 changed files with 7 additions and 3 deletions
|
|
@ -11,12 +11,16 @@ const ConfigSchema = new Schema({
|
||||||
default: "Unnamed"
|
default: "Unnamed"
|
||||||
},
|
},
|
||||||
json: Object,
|
json: Object,
|
||||||
|
}, {
|
||||||
|
timestamps: true
|
||||||
})
|
})
|
||||||
|
|
||||||
export type ConfigModel = Document & {
|
export type ConfigModel = Document & {
|
||||||
_id: string,
|
_id: string
|
||||||
name: string,
|
name: string
|
||||||
json: object,
|
json: object
|
||||||
|
createdAt: Date
|
||||||
|
updatedAt: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export default model<ConfigModel>('configs', ConfigSchema, 'configs')
|
export default model<ConfigModel>('configs', ConfigSchema, 'configs')
|
||||||
Loading…
Reference in a new issue