public static function hydrate(stdClass $setting)
    {
        $hydrated = new SettingEntity();

        if (isset($setting->key)) {
            $hydrated->setKey($setting->key);
        }

        if (isset($setting->value)) {
            $hydrated->setValue($setting->value);
        }

        if (isset($setting->created_at)) {
            $hydrated->setCreatedAt(new DateTime($setting->created_at));
        }

        return $hydrated;
    }