Add proper compliance report type

Can't believe I missed this.
This commit is contained in:
Eli Ribble 2026-04-13 16:42:29 +00:00
parent 0f94292ab7
commit 5db4c05544
No known key found for this signature in database
3 changed files with 9 additions and 4 deletions

View file

@ -2147,14 +2147,16 @@ func (e *PublicreportReportstatustype) Scan(value any) error {
// Enum values for PublicreportReporttype
const (
PublicreportReporttypeNuisance PublicreportReporttype = "nuisance"
PublicreportReporttypeWater PublicreportReporttype = "water"
PublicreportReporttypeNuisance PublicreportReporttype = "nuisance"
PublicreportReporttypeWater PublicreportReporttype = "water"
PublicreportReporttypeCompliance PublicreportReporttype = "compliance"
)
func AllPublicreportReporttype() []PublicreportReporttype {
return []PublicreportReporttype{
PublicreportReporttypeNuisance,
PublicreportReporttypeWater,
PublicreportReporttypeCompliance,
}
}
@ -2167,7 +2169,8 @@ func (e PublicreportReporttype) String() string {
func (e PublicreportReporttype) Valid() bool {
switch e {
case PublicreportReporttypeNuisance,
PublicreportReporttypeWater:
PublicreportReporttypeWater,
PublicreportReporttypeCompliance:
return true
default:
return false

View file

@ -0,0 +1,2 @@
-- +goose Up
ALTER TYPE publicreport.ReportType ADD VALUE 'compliance' AFTER 'water';

View file

@ -63,7 +63,7 @@ func (res *complianceR) Create(ctx context.Context, r *http.Request, n publicrep
ReporterEmail: omit.From(""),
ReporterName: omit.From(""),
ReporterPhone: omit.From(""),
ReportType: omit.From(enums.PublicreportReporttypeNuisance),
ReportType: omit.From(enums.PublicreportReporttypeCompliance),
Status: omit.From(enums.PublicreportReportstatustypeReported),
}
setter_compliance := models.PublicreportComplianceSetter{