mongoose-time:猫鼬模式的时间戳

时间:2024-06-17 13:31:53
【文件属性】:

文件名称:mongoose-time:猫鼬模式的时间戳

文件大小:3KB

文件格式:ZIP

更新时间:2024-06-17 13:31:53

JavaScript

猫鼬时间 猫鼬的时间戳,填充created_at和updated_at 。 安装 $ npm install mongoose-time 用法 var mongoose = require ( 'mongoose' ) , Schema = mongoose . Schema , model = mongoose . model . bind ( mongoose ) , timestamps = require ( 'mongoose-time' ) ; var schema = new Schema ( { } ) . plugin ( timestamps ( ) ) ; var Artist = model ( 'Artist' , schema ) ; 运行测试 确保您编辑以设置测试应在其上运行的数据库。 $ make test 执照 麻省理工学院


【文件预览】:
mongoose-time-master
----index.js(551B)
----package.json(397B)
----test()
--------index.js(1KB)
--------db.json(45B)
----Readme.md(577B)
----History.md(152B)
----Makefile(88B)

网友评论