<?php

declare(strict_types=1);

namespace Apexl\Io\Enums;

enum Casts
{
    case BOOLEAN;
    case BOOL;
    case INTEGER;
    case INT;
    case FLOAT;
    case DOUBLE;
    case STRING;
    case ARRAY;
    case OBJECT;
    case NULL;
    case DATE;
    case DATETIME;
    case DATETIME_STAMP;
    case SERIALIZE;
    case CURRENCY;
    case JSON;

    public function getType(): string
    {
        return match ($this) {
            Casts::DATETIME_STAMP => 'int',
            default => strtolower($this->name),
        };
    }
}
