Add proper compliance report type
Can't believe I missed this.
This commit is contained in:
parent
0f94292ab7
commit
5db4c05544
3 changed files with 9 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
-- +goose Up
|
||||
ALTER TYPE publicreport.ReportType ADD VALUE 'compliance' AFTER 'water';
|
||||
|
|
@ -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{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue