//
// Code generated by go-jet DO NOT EDIT.
//
// WARNING: Changes to this file may cause incorrect behavior
// and will be lost if the code is regenerated
//

package model

import "errors"

type Reporttype string

const (
	Reporttype_Nuisance   Reporttype = "nuisance"
	Reporttype_Water      Reporttype = "water"
	Reporttype_Compliance Reporttype = "compliance"
)

var ReporttypeAllValues = []Reporttype{
	Reporttype_Nuisance,
	Reporttype_Water,
	Reporttype_Compliance,
}

func (e *Reporttype) Scan(value interface{}) error {
	var enumValue string
	switch val := value.(type) {
	case string:
		enumValue = val
	case []byte:
		enumValue = string(val)
	default:
		return errors.New("jet: Invalid scan value for AllTypesEnum enum. Enum value has to be of type string or []byte")
	}

	switch enumValue {
	case "nuisance":
		*e = Reporttype_Nuisance
	case "water":
		*e = Reporttype_Water
	case "compliance":
		*e = Reporttype_Compliance
	default:
		return errors.New("jet: Invalid scan value '" + enumValue + "' for Reporttype enum")
	}

	return nil
}

func (e Reporttype) String() string {
	return string(e)
}
