package models

import (
	"database/sql/driver"
)

// The type of being an account identifies as
// This is distinctly separate from the account being as being controlled by script
// or other automated method
type BeingType string

const (
	BEING_HUMAN = BeingType("human") // Is a human
	BEING_CAT   = BeingType("cat")   // Is a cat
	BEING_FOX   = BeingType("fox")   // Is a fox
	BEING_DOG   = BeingType("dog")   // Is a dog
	BEING_ROBOT = BeingType("robot") // Is a robot
	BEING_DOLL  = BeingType("doll")  // Is a doll
)

var AllBeings = []BeingType{BEING_HUMAN, BEING_CAT, BEING_FOX, BEING_DOG, BEING_ROBOT, BEING_DOLL}

func (ct *BeingType) Scan(value any) error {
	*ct = BeingType(value.([]byte))
	return nil
}

func (ct BeingType) Value() (driver.Value, error) {
	return string(ct), nil
}
