<?php

declare(strict_types=1);
/**
 * Copyright 2022-2025 FOSSBilling
 * Copyright 2011-2021 BoxBilling, Inc.
 * SPDX-License-Identifier: Apache-2.0.
 *
 * @copyright FOSSBilling (https://www.fossbilling.org)
 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache-2.0
 */
class Model_ClientOrder extends RedBeanPHP\SimpleModel
{
    final public const string STATUS_PENDING_SETUP = 'pending_setup';
    final public const string STATUS_FAILED_SETUP = 'failed_setup';
    final public const string STATUS_FAILED_RENEW = 'failed_renew';
    final public const string STATUS_ACTIVE = 'active';
    final public const string STATUS_CANCELED = 'canceled';
    final public const string STATUS_SUSPENDED = 'suspended';

    final public const string ACTION_CREATE = 'create';
    final public const string ACTION_ACTIVATE = 'activate';
    final public const string ACTION_RENEW = 'renew';
    final public const string ACTION_SUSPEND = 'suspend';
    final public const string ACTION_UNSUSPEND = 'unsuspend';
    final public const string ACTION_CANCEL = 'cancel';
    final public const string ACTION_UNCANCEL = 'uncancel';
    final public const string ACTION_DELETE = 'delete';

    public static function getValidStatuses(): array
    {
        return [
            self::STATUS_PENDING_SETUP,
            self::STATUS_FAILED_SETUP,
            self::STATUS_FAILED_RENEW,
            self::STATUS_ACTIVE,
            self::STATUS_CANCELED,
            self::STATUS_SUSPENDED,
        ];
    }
}
