sowell-models 1.3.0 → 1.4.0

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,10 +1,10 @@
1
1
  {
2
2
  "name": "sowell-models",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "SoWell models",
5
5
  "type": "module",
6
6
  "engines": {
7
- "node": ">= 20.9 < 21 || ^20.10.0"
7
+ "node": ">= 20.9 < 21 || ^22"
8
8
  },
9
9
  "devDependencies": {
10
10
  "@eslint/js": "~9.10",
@@ -33,6 +33,7 @@ export interface VisitReportPayload {
33
33
  fullName: string
34
34
  }
35
35
  comment?: string
36
+ isMissingProvider?: boolean
36
37
  validate?: (payload: VisitReportPayload) => string
37
38
  }
38
39
 
@@ -71,6 +72,7 @@ export interface IVisitReport extends IModel {
71
72
  full_name: string
72
73
  }
73
74
  score?: number
75
+ isMissingProvider?: boolean
74
76
  validate?: (payload: VisitReportPayload) => string
75
77
  }
76
78
 
@@ -87,6 +89,7 @@ export class SPVisitReport extends ApplicationRecord implements IVisitReport {
87
89
  }
88
90
  @Attr() comment!: string
89
91
  @Attr() imgs!: string[]
92
+ @Attr() isMissingProvider!: boolean
90
93
  @BelongsTo() author!: SPUserItem
91
94
  @BelongsTo() visitSchedule!: SPVisitSchedule
92
95
  @BelongsTo() checklist!: SPChecklistItem
@@ -95,7 +98,7 @@ export class SPVisitReport extends ApplicationRecord implements IVisitReport {
95
98
  @BelongsTo() spot!: SPSpotItem
96
99
  @HasMany() issueReports!: SPIssueReportItem[]
97
100
 
98
- static async validate(payload: VisitReportPayload) {
101
+ static async validate(payload: VisitReportPayload): Promise<string> {
99
102
  const schema = yup
100
103
  .object()
101
104
  .required()