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

const (
	Csvtype_PoolList Csvtype = "PoolList"
	Csvtype_Flyover  Csvtype = "Flyover"
)

var CsvtypeAllValues = []Csvtype{
	Csvtype_PoolList,
	Csvtype_Flyover,
}

func (e *Csvtype) 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 "PoolList":
		*e = Csvtype_PoolList
	case "Flyover":
		*e = Csvtype_Flyover
	default:
		return errors.New("jet: Invalid scan value '" + enumValue + "' for Csvtype enum")
	}

	return nil
}

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