payservedb 8.4.7 → 8.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payservedb",
3
- "version": "8.4.7",
3
+ "version": "8.4.9",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -2,24 +2,35 @@ const mongoose = require('mongoose');
2
2
 
3
3
  const communityGuidelinesSchema = new mongoose.Schema({
4
4
  title: {
5
- type: String,
6
- default: "Community Guidelines",
5
+ type: String,
6
+ default: "Community Guidelines",
7
7
  },
8
8
  content: {
9
- type: String,
10
- required: true,
9
+ type: String,
10
+ required: false, // Make optional since we might have PDF instead
11
+ },
12
+ contentType: {
13
+ type: String,
14
+ enum: ['text', 'pdf'],
15
+ default: 'text',
16
+ required: true,
17
+ },
18
+ pdfUrl: {
19
+ type: String,
20
+ required: false, // URL to the stored PDF
11
21
  },
12
22
  facilityId: {
13
- type: mongoose.Schema.Types.ObjectId,
14
- ref: 'Facility',
15
- required: true,
23
+ type: mongoose.Schema.Types.ObjectId,
24
+ ref: 'Facility',
25
+ required: true,
16
26
  },
17
- },
18
- {
27
+ pdfFileName: {
28
+ type: String,
29
+ required: false,
30
+ },
31
+ }, {
19
32
  timestamps: true,
20
- }
21
- );
33
+ });
22
34
 
23
35
  const CommunityGuidelines = mongoose.model('CommunityGuidelines', communityGuidelinesSchema);
24
-
25
36
  module.exports = CommunityGuidelines;