package domain

import (
	"errors"

	"source.toby3d.me/toby3d/home/internal/common"
)

type ResourceType string

var (
	ResourceTypeUnd   ResourceType = ""      // "und"
	ResourceTypeAudio ResourceType = "audio" // "audio"
	ResourceTypeImage ResourceType = "image" // "image"
	ResourceTypePage  ResourceType = "page"  // "page"
	ResourceTypeText  ResourceType = "text"  // "text"
	ResourceTypeVideo ResourceType = "video" // "video"
)

var ErrResourceType error = errors.New("unsupported ResourceType enum")

func (rt ResourceType) String() string {
	if rt != "" {
		return string(rt)
	}

	return common.Und
}

func (rt ResourceType) GoString() string {
	return "domain.ResourceType(" + rt.String() + ")"
}
