@wbget/midway-uuid-int
v2.0.0
Published
midwayjs uuid-int module
Readme
midwayjs uuid-int module
Install
npm install midway-uuid-int --save
Config
None.
Use
@Inject()
uuidInt: UUIDIntService;
doSomething() {
const id = this.uuidInt.uuid(); // generate id by uuid-int
}Use Redis
Edit config.default.ts
// no redis
export const uuidInt = {};
// redis
export const uuidInt = {
prefix?: 'uuid-int', // redis prefix key
key?: 'default', // default key
}
// custom key
const gen = service.getGen('other-key');
gen.uuid();