typeorm-scopes

时间:2021-05-02 09:48:11
【文件属性】:
文件名称:typeorm-scopes
文件大小:77KB
文件格式:ZIP
更新时间:2021-05-02 09:48:11
hacktoberfest hacktoberfest2020 TypeScript Typeorm范围 typeorm的范围(基于活动记录) 为什么? 例如,请参见 非常方便,不是吗? 用法 现在,仅当typeorm与Active Record模式一起使用时才实现。 @ Entity ( ) class User extends BaseEntity { // Scopes static get active ( ) : typeof User { return declareScope ( User , this , { status : 'active' } ) ; } static createdBefore ( date : Date ) : typeof User { return declareScope ( Project , this , { createdAt : Between ( n
【文件预览】:
typeorm-scopes-master
----.gitignore(27B)
----package.json(1KB)
----package-lock.json(296KB)
----src()
--------index.ts(2KB)
----.travis.yml(215B)
----samples()
--------simple.ts(676B)
--------with-parameters.ts(2KB)
----tsconfig.json(314B)
----.eslintrc.js(845B)
----README.md(1KB)
----tsconfig.build.json(57B)
----.npmignore(95B)
----test()
--------simple.test.ts(2KB)
--------.keep(0B)
----.editorconfig(304B)
----.prettierrc(430B)

网友评论