model-structure:model-structure 是一个模块,可帮助您基于 Schema 的对象创建模型-源码

上传者: 42099814 | 上传时间: 2021-06-17 22:04:18 | 文件大小: 132KB | 文件类型: ZIP
#模型结构 model-structure可帮助您基于架构的对象创建模型。 它可以: 设置自定义存储库以创建、更新、获取和删除 获取 Swagger 模型 获取 db-migrate JSON 嵌套对象支持(验证也是!) 在创建、更新或独立之前调用验证 基于 Schema 的自定义异步验证 自定义验证消息,按验证或属性 安装 $ npm install model-structure Model.init(constructor, schema) ; 用于在对象构造函数中绑定原型属性 constructor - 对象构造函数 schema - 具有属性详细信息的对象架构 Model.instantiate(instance, data, options) ; 在对象构造函数中使用 instance - this参考 data - 对象数据属性 options - 模型选项

文件下载

资源详情

[{"title":"( 51 个子文件 132KB ) model-structure:model-structure 是一个模块,可帮助您基于 Schema 的对象创建模型-源码","children":[{"title":"model-structure-master","children":[{"title":".jshintrc <span style='color:#111;'> 3.52KB </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 53B </span>","children":null,"spread":false},{"title":"package.json <span style='color:#111;'> 1.51KB </span>","children":null,"spread":false},{"title":"src","children":[{"title":"validator.js <span style='color:#111;'> 3.55KB </span>","children":null,"spread":false},{"title":"model","children":[{"title":"load.js <span style='color:#111;'> 1.18KB </span>","children":null,"spread":false},{"title":"destroy.js <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":"index.js <span style='color:#111;'> 3.96KB </span>","children":null,"spread":false},{"title":"get.js <span style='color:#111;'> 1.49KB </span>","children":null,"spread":false},{"title":"create.js <span style='color:#111;'> 1.00KB </span>","children":null,"spread":false},{"title":"update.js <span style='color:#111;'> 1024B </span>","children":null,"spread":false}],"spread":true},{"title":"validation-error.js <span style='color:#111;'> 367B </span>","children":null,"spread":false},{"title":"helpers","children":[{"title":"property-helper.js <span style='color:#111;'> 3.83KB </span>","children":null,"spread":false},{"title":"validator-helper.js <span style='color:#111;'> 1.65KB </span>","children":null,"spread":false},{"title":"swagger-helper.js <span style='color:#111;'> 1.99KB </span>","children":null,"spread":false},{"title":"db-helper.js <span style='color:#111;'> 1.03KB </span>","children":null,"spread":false}],"spread":true},{"title":"repository.js <span style='color:#111;'> 1.03KB </span>","children":null,"spread":false}],"spread":true},{"title":".travis.yml <span style='color:#111;'> 79B </span>","children":null,"spread":false},{"title":"gulpfile.js <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"dist","children":[{"title":"model-structure.js <span style='color:#111;'> 279.07KB </span>","children":null,"spread":false},{"title":"model-structure-min.js <span style='color:#111;'> 100.91KB </span>","children":null,"spread":false}],"spread":true},{"title":"index.js <span style='color:#111;'> 766B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 8.93KB </span>","children":null,"spread":false},{"title":"test","children":[{"title":"helpers","children":[{"title":"db-helper.js <span style='color:#111;'> 5.08KB </span>","children":null,"spread":false}],"spread":true},{"title":"crud.js <span style='color:#111;'> 5.38KB </span>","children":null,"spread":false},{"title":"repository.js <span style='color:#111;'> 1.42KB </span>","children":null,"spread":false},{"title":"messages.js <span style='color:#111;'> 1.17KB </span>","children":null,"spread":false},{"title":"mocha.opts <span style='color:#111;'> 20B </span>","children":null,"spread":false},{"title":"swagger","children":[{"title":"index.js <span style='color:#111;'> 2.75KB </span>","children":null,"spread":false}],"spread":false},{"title":"validations","children":[{"title":"enum.js <span style='color:#111;'> 1.89KB </span>","children":null,"spread":false},{"title":"email.js <span style='color:#111;'> 1.47KB </span>","children":null,"spread":false},{"title":"string.js <span style='color:#111;'> 3.58KB </span>","children":null,"spread":false},{"title":"float.js <span style='color:#111;'> 1.85KB </span>","children":null,"spread":false},{"title":"datetime.js <span style='color:#111;'> 2.68KB </span>","children":null,"spread":false},{"title":"index.js <span style='color:#111;'> 2.71KB </span>","children":null,"spread":false},{"title":"required.js <span style='color:#111;'> 1.63KB </span>","children":null,"spread":false},{"title":"promise.js <span style='color:#111;'> 4.45KB </span>","children":null,"spread":false},{"title":"nested.js <span style='color:#111;'> 2.40KB </span>","children":null,"spread":false},{"title":"date.js <span style='color:#111;'> 2.35KB </span>","children":null,"spread":false},{"title":"array.js <span style='color:#111;'> 1.97KB </span>","children":null,"spread":false},{"title":"integer.js <span style='color:#111;'> 1.58KB </span>","children":null,"spread":false}],"spread":false},{"title":"model.js <span style='color:#111;'> 1.63KB </span>","children":null,"spread":false},{"title":"properties.js <span style='color:#111;'> 868B </span>","children":null,"spread":false},{"title":"fixtures","children":[{"title":"data","children":[{"title":"customer","children":[{"title":"basic.json <span style='color:#111;'> 155B </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"models","children":[{"title":"phone.js <span style='color:#111;'> 526B </span>","children":null,"spread":false},{"title":"customer.js <span style='color:#111;'> 1.82KB </span>","children":null,"spread":false},{"title":"address.js <span style='color:#111;'> 625B </span>","children":null,"spread":false}],"spread":false},{"title":"repositories","children":[{"title":"customerRepository.js <span style='color:#111;'> 1.15KB </span>","children":null,"spread":false},{"title":"modelRepository.js <span style='color:#111;'> 1.13KB </span>","children":null,"spread":false},{"title":"promiseRepository.js <span style='color:#111;'> 1.10KB </span>","children":null,"spread":false},{"title":"argumentRepository.js <span style='color:#111;'> 1.15KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"test-helpers","children":[{"title":"message.js <span style='color:#111;'> 226B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明