payservedb 4.9.7 → 4.9.9
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.
- package/index.js +1 -1
- package/package.json +1 -1
- package/src/models/gl_entries.js +6 -10
- package/src/models/user.js +4 -0
package/index.js
CHANGED
|
@@ -153,7 +153,7 @@ const models = {
|
|
|
153
153
|
BookingAnalytics: require('./src/models/bookinganalytics'),
|
|
154
154
|
RevenueRecord: require('./src/models/bookingrevenuerecord'),
|
|
155
155
|
GLAccount: require('./src/models/gl_accounts'),
|
|
156
|
-
|
|
156
|
+
GLEntry: require('./src/models/gl_entries'),
|
|
157
157
|
};
|
|
158
158
|
|
|
159
159
|
// Function to get models dynamically from a specific database connection
|
package/package.json
CHANGED
package/src/models/gl_entries.js
CHANGED
|
@@ -36,20 +36,16 @@ const glEntriesSchema = new mongoose.Schema({
|
|
|
36
36
|
type: Boolean,
|
|
37
37
|
default: true,
|
|
38
38
|
},
|
|
39
|
-
createdBy: {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
39
|
+
// createdBy: {
|
|
40
|
+
// type: mongoose.Schema.Types.ObjectId,
|
|
41
|
+
// ref: 'User',
|
|
42
|
+
// required: true,
|
|
43
|
+
// },
|
|
44
44
|
entryType: {
|
|
45
45
|
type: String,
|
|
46
46
|
enum: ['debit', 'credit'],
|
|
47
47
|
required: true,
|
|
48
48
|
},
|
|
49
|
-
transactionFeeDate: {
|
|
50
|
-
type: Date,
|
|
51
|
-
required: true,
|
|
52
|
-
},
|
|
53
49
|
});
|
|
54
50
|
|
|
55
|
-
module.exports = mongoose.model('
|
|
51
|
+
module.exports = mongoose.model('GLEntry', glEntriesSchema);
|
package/src/models/user.js
CHANGED
|
@@ -27,6 +27,10 @@ const userSchema = new mongoose.Schema({
|
|
|
27
27
|
required: [true, 'Type is required'],
|
|
28
28
|
enum: ['Company', 'Project Manager', 'Universal', 'Core', 'Resident', 'Landlord'],
|
|
29
29
|
},
|
|
30
|
+
department: {
|
|
31
|
+
type: String,
|
|
32
|
+
trim: true,
|
|
33
|
+
},
|
|
30
34
|
role: {
|
|
31
35
|
type: String,
|
|
32
36
|
required: [true, 'Role is required'],
|