@churchsoln/dbms 1.0.20 → 1.0.21

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.
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ module.exports = {
4
+ up: async (queryInterface, DataTypes) => {
5
+ return Promise.all([
6
+ queryInterface.removeColumn("Pledge", "received"),
7
+ queryInterface.removeColumn("Pledge", "remaining"),
8
+ ]);
9
+ },
10
+
11
+ down: async (queryInterface) => {},
12
+ };
@@ -12,6 +12,12 @@ module.exports = (sequelize, DataTypes) => {
12
12
  },
13
13
  { freezeTableName: true, timestamps: false }
14
14
  );
15
+ accounts.associate = function (models) {
16
+ accounts.hasOne(models.donation, {
17
+ foreignKey: "accountId",
18
+ as: "donation",
19
+ });
20
+ }
15
21
  accounts.selectedFields = ["id", "accountHead", "accountDescription", "isLinkedWithQB"];
16
22
  return accounts;
17
23
  };
@@ -8,8 +8,6 @@ module.exports = (sequelize, DataTypes) => {
8
8
  frequency: { type: DataTypes.STRING },
9
9
  duration: { type: DataTypes.INTEGER },
10
10
  pledged: { type: DataTypes.INTEGER },
11
- received: { type: DataTypes.INTEGER },
12
- remaining: { type: DataTypes.INTEGER },
13
11
  status: { type: DataTypes.BOOLEAN, defaultValue: true },
14
12
  createdAt: {
15
13
  type: DataTypes.DATE,
@@ -55,8 +53,6 @@ module.exports = (sequelize, DataTypes) => {
55
53
  "frequency",
56
54
  "duration",
57
55
  "pledged",
58
- "received",
59
- "remaining",
60
56
  "status",
61
57
  "createdAt",
62
58
  "updatedAt",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@churchsoln/dbms",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "prestart": "node db-setup.js",
@@ -111,7 +111,7 @@ module.exports = {
111
111
  ]
112
112
  },
113
113
  {
114
- name: "Accounts",
114
+ name: "Accounts Management",
115
115
  isSubscription: true,
116
116
  cost: 1.5,
117
117
  status: true,
@@ -163,7 +163,7 @@ module.exports = {
163
163
  ]
164
164
  },
165
165
  {
166
- name: "Accounts Management",
166
+ name: "Account Reports",
167
167
  isSubscription: true,
168
168
  cost: 2,
169
169
  status: true,