//
// 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 Reviewtaskresolutiontype string

const (
	Reviewtaskresolutiontype_Committed Reviewtaskresolutiontype = "committed"
	Reviewtaskresolutiontype_Discarded Reviewtaskresolutiontype = "discarded"
)

var ReviewtaskresolutiontypeAllValues = []Reviewtaskresolutiontype{
	Reviewtaskresolutiontype_Committed,
	Reviewtaskresolutiontype_Discarded,
}

func (e *Reviewtaskresolutiontype) 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 "committed":
		*e = Reviewtaskresolutiontype_Committed
	case "discarded":
		*e = Reviewtaskresolutiontype_Discarded
	default:
		return errors.New("jet: Invalid scan value '" + enumValue + "' for Reviewtaskresolutiontype enum")
	}

	return nil
}

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