@churchsoln/dbms 1.0.38 → 1.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ module.exports = {
6
6
  "ContributionBatch",
7
7
  {
8
8
  id: {
9
- type: DataTypes.BIGINT,
9
+ type: DataTypes.INTEGER,
10
10
  autoIncrement: true,
11
11
  primaryKey: true,
12
12
  },
@@ -6,7 +6,7 @@ module.exports = {
6
6
  "ContributionTransaction",
7
7
  {
8
8
  id: {
9
- type: DataTypes.BIGINT,
9
+ type: DataTypes.INTEGER,
10
10
  autoIncrement: true,
11
11
  primaryKey: true,
12
12
  },
@@ -6,12 +6,12 @@ module.exports = {
6
6
  "ContributionTransactionLine",
7
7
  {
8
8
  id: {
9
- type: DataTypes.BIGINT,
9
+ type: DataTypes.INTEGER,
10
10
  autoIncrement: true,
11
11
  primaryKey: true,
12
12
  },
13
13
  contributionTransactionId: {
14
- type: DataTypes.BIGINT,
14
+ type: DataTypes.INTEGER,
15
15
  allowNull: false,
16
16
  validate: {
17
17
  notNull: { msg: "Transaction ID is required" },
@@ -24,7 +24,7 @@ module.exports = {
24
24
  onDelete: "CASCADE",
25
25
  },
26
26
  accountId: {
27
- type: DataTypes.BIGINT,
27
+ type: DataTypes.INTEGER,
28
28
  allowNull: false,
29
29
  validate: {
30
30
  notNull: { msg: "Account ID is required" },
@@ -57,6 +57,14 @@ module.exports = {
57
57
  memo: {
58
58
  type: DataTypes.TEXT,
59
59
  },
60
+ createdAt: {
61
+ type: DataTypes.DATE,
62
+ defaultValue: DataTypes.literal("CURRENT_TIMESTAMP"),
63
+ },
64
+ updatedAt: {
65
+ type: DataTypes.DATE,
66
+ defaultValue: DataTypes.literal("CURRENT_TIMESTAMP"),
67
+ },
60
68
  },
61
69
  { timestamps: false }
62
70
  )
@@ -3,7 +3,7 @@ module.exports = (sequelize, DataTypes) => {
3
3
  "ContributionBatch",
4
4
  {
5
5
  id: {
6
- type: DataTypes.BIGINT,
6
+ type: DataTypes.INTEGER,
7
7
  autoIncrement: true,
8
8
  primaryKey: true,
9
9
  },
@@ -5,7 +5,7 @@ module.exports = (sequelize, DataTypes) => {
5
5
  "ContributionTransaction",
6
6
  {
7
7
  id: {
8
- type: DataTypes.BIGINT,
8
+ type: DataTypes.INTEGER,
9
9
  autoIncrement: true,
10
10
  primaryKey: true,
11
11
  },
@@ -3,12 +3,12 @@ module.exports = (sequelize, DataTypes) => {
3
3
  "ContributionTransactionLine",
4
4
  {
5
5
  id: {
6
- type: DataTypes.BIGINT,
6
+ type: DataTypes.INTEGER,
7
7
  autoIncrement: true,
8
8
  primaryKey: true,
9
9
  },
10
10
  contributionTransactionId: {
11
- type: DataTypes.BIGINT,
11
+ type: DataTypes.INTEGER,
12
12
  allowNull: false,
13
13
  validate: {
14
14
  notNull: { msg: "Transaction ID is required" },
@@ -16,7 +16,7 @@ module.exports = (sequelize, DataTypes) => {
16
16
  },
17
17
  },
18
18
  accountId: {
19
- type: DataTypes.BIGINT,
19
+ type: DataTypes.INTEGER,
20
20
  allowNull: false,
21
21
  validate: {
22
22
  notNull: { msg: "Account ID is required" },
@@ -44,6 +44,14 @@ module.exports = (sequelize, DataTypes) => {
44
44
  memo: {
45
45
  type: DataTypes.TEXT,
46
46
  },
47
+ createdAt: {
48
+ type: DataTypes.DATE,
49
+ defaultValue: DataTypes.literal("CURRENT_TIMESTAMP"),
50
+ },
51
+ updatedAt: {
52
+ type: DataTypes.DATE,
53
+ defaultValue: DataTypes.literal("CURRENT_TIMESTAMP"),
54
+ },
47
55
  },
48
56
  { freezeTableName: true, timestamps: false }
49
57
  );
@@ -60,7 +68,9 @@ module.exports = (sequelize, DataTypes) => {
60
68
  "isLoosePlate",
61
69
  "amount",
62
70
  "isTaxable",
63
- "memo"
71
+ "memo",
72
+ "createdAt",
73
+ "updatedAt"
64
74
  ];
65
75
  return contributionTransactionLine;
66
76
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@churchsoln/dbms",
3
- "version": "1.0.38",
3
+ "version": "1.0.40",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "prestart": "node db-setup.js",
@@ -172,6 +172,16 @@ module.exports = {
172
172
  SUBSCRIPTION_PLAN_ID.CUSTOM
173
173
  ]
174
174
  },
175
+ {
176
+ name: "Pledge Management",
177
+ isSubscription: true,
178
+ cost: 2,
179
+ status: true,
180
+ subscriptionPlanId: [
181
+ SUBSCRIPTION_PLAN_ID.PREMIUM,
182
+ SUBSCRIPTION_PLAN_ID.CUSTOM
183
+ ]
184
+ },
175
185
  ];
176
186
  for (const [index, { subscriptionPlanId, ...permission}] of permissions.entries()) {
177
187
  const existingPermission = await queryInterface.rawSelect(