@bmstravel/nvp-plop-templates 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,7 +8,12 @@ import { STATUS } from "@src/common"
8
8
 
9
9
  export interface I{{pascalCase name}} {
10
10
  {{#if hasId}}
11
+ {{#eq dataTypeId "integer"}}
11
12
  id: number;
13
+ {{/eq}}
14
+ {{#eq dataTypeId "uuid"}}
15
+ id: string;
16
+ {{/eq}}
12
17
  {{/if}}
13
18
  // BEGIN addition here
14
19
 
@@ -36,7 +41,9 @@ const {{pascalCase name}}Model: ISequelizeModel<I{{pascalCase name}}> = {
36
41
  {{/eq}}
37
42
  {{#eq dataTypeId "uuid"}}
38
43
  type: DataTypes.STRING,
39
- defaultValue: generateUuid({ _prefix: '{{truncate (camelCase name) 3}}' }),
44
+ defaultValue: function () {
45
+ return generateUuid({ _prefix: '{{truncate (camelCase name) 4}}', length: 19, replaceDash: true })
46
+ },,
40
47
  {{/eq}}
41
48
  primaryKey: true,
42
49
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bmstravel/nvp-plop-templates",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "🏆 Using for plop templates",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",
@@ -8,9 +8,6 @@
8
8
  "/lib"
9
9
  ],
10
10
  "scripts": {},
11
- "dependencies": {
12
- "sequelize": "6.21.0"
13
- },
14
11
  "publishConfig": {
15
12
  "access": "public"
16
13
  },
@@ -18,5 +15,5 @@
18
15
  "phongnv86 <phongnguyenvan86@gmail.com>",
19
16
  "phongnv86 <phongnv@media-one.vn>"
20
17
  ],
21
- "gitHead": "754eeaf826bbf3d3cfaa05629cf3672ab0e29aff"
18
+ "gitHead": "f4953836288d23d681cc842bf8b6bf4ee7b3760e"
22
19
  }