@bmstravel/nvp-plop-templates 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,6 +4,7 @@ import dayjs from "dayjs";
4
4
  import { generateUuid } from '@bmstravel/nvp-utils'
5
5
  {{/eq}}
6
6
  import { ISequelizeModel } from '@src/types'
7
+ import { STATUS } from "@src/common"
7
8
 
8
9
  export interface I{{pascalCase name}} {
9
10
  {{#if hasId}}
@@ -13,9 +14,14 @@ export interface I{{pascalCase name}} {
13
14
 
14
15
  // END addition here
15
16
  {{#if hasId}}
17
+ status: STATUS
18
+ createdBy?: any
19
+ updatedBy?: any
20
+ deleteBy?: any
21
+ isDelete?: boolean
16
22
  createdAt: number;
17
23
  updatedAt: number;
18
- deletedAt: number;
24
+ deletedAt?: number;
19
25
  {{/if}}
20
26
  }
21
27
 
@@ -39,6 +45,28 @@ const {{pascalCase name}}Model: ISequelizeModel<I{{pascalCase name}}> = {
39
45
 
40
46
  // END addition here
41
47
  {{#if hasCrudDate}}
48
+ status: {
49
+ type: DataTypes.STRING(20),
50
+ values: Object.values(STATUS),
51
+ defaultValue: STATUS.ACTIVE,
52
+ },
53
+ createdBy: {
54
+ type: DataTypes.STRING(15),
55
+ allowNull: true,
56
+ },
57
+ updatedBy: {
58
+ type: DataTypes.STRING(15),
59
+ allowNull: true,
60
+ },
61
+ deleteBy: {
62
+ type: DataTypes.STRING(15),
63
+ allowNull: true,
64
+ },
65
+ isDelete: {
66
+ type: DataTypes.BOOLEAN,
67
+ allowNull: true,
68
+ defaultValue: false,
69
+ },
42
70
  createdAt: {
43
71
  type: DataTypes.BIGINT,
44
72
  allowNull: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bmstravel/nvp-plop-templates",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "🏆 Using for plop templates",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",
@@ -15,5 +15,5 @@
15
15
  "phongnv86 <phongnguyenvan86@gmail.com>",
16
16
  "phongnv86 <phongnv@media-one.vn>"
17
17
  ],
18
- "gitHead": "42201e64954f884fef901d6d10e4bb90fbf46ab5"
18
+ "gitHead": "3082145323bed4a31356a5525c9cff87dc16bafc"
19
19
  }