Use PHP 7.4 featers and PHP 8 polyfills
This commit is contained in:
@ -28,9 +28,9 @@ class Discount_Codes_Schema extends Schema {
|
||||
* @access public
|
||||
* @var array
|
||||
*/
|
||||
public $columns = array(
|
||||
public $columns = [
|
||||
|
||||
array(
|
||||
[
|
||||
'name' => 'id',
|
||||
'type' => 'bigint',
|
||||
'length' => '20',
|
||||
@ -38,40 +38,40 @@ class Discount_Codes_Schema extends Schema {
|
||||
'extra' => 'auto_increment',
|
||||
'primary' => true,
|
||||
'sortable' => true,
|
||||
),
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'name' => 'name',
|
||||
'type' => 'varchar',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
),
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'name' => 'code',
|
||||
'type' => 'varchar',
|
||||
'length' => '20',
|
||||
'sortable' => true,
|
||||
'searchable' => true,
|
||||
'transition' => true,
|
||||
),
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'name' => 'description',
|
||||
'type' => 'longtext',
|
||||
'default' => '',
|
||||
'searchable' => true,
|
||||
),
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'name' => 'uses',
|
||||
'type' => 'int',
|
||||
'unsigned' => true,
|
||||
'sortable' => true,
|
||||
'transition' => true,
|
||||
),
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'name' => 'max_uses',
|
||||
'type' => 'int',
|
||||
'unsigned' => true,
|
||||
@ -79,9 +79,9 @@ class Discount_Codes_Schema extends Schema {
|
||||
'transition' => true,
|
||||
'allow_null' => true,
|
||||
'default' => 0,
|
||||
),
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'name' => 'apply_to_renewals',
|
||||
'type' => 'tinyint',
|
||||
'length' => '4',
|
||||
@ -89,39 +89,39 @@ class Discount_Codes_Schema extends Schema {
|
||||
'default' => 0,
|
||||
'transition' => true,
|
||||
'sortable' => true,
|
||||
),
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'name' => 'type',
|
||||
'type' => 'enum(\'percentage\', \'absolute\')',
|
||||
'default' => 'percentage',
|
||||
'transition' => true,
|
||||
),
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'name' => 'value',
|
||||
'type' => 'decimal(13,4)',
|
||||
'default' => '',
|
||||
'sortable' => true,
|
||||
'transition' => true,
|
||||
),
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'name' => 'setup_fee_type',
|
||||
'type' => 'enum(\'percentage\', \'absolute\')',
|
||||
'default' => 'percentage',
|
||||
'transition' => true,
|
||||
),
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'name' => 'setup_fee_value',
|
||||
'type' => 'decimal(13,4)',
|
||||
'default' => '',
|
||||
'sortable' => true,
|
||||
'transition' => true,
|
||||
),
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'name' => 'active',
|
||||
'type' => 'tinyint',
|
||||
'length' => '4',
|
||||
@ -129,9 +129,9 @@ class Discount_Codes_Schema extends Schema {
|
||||
'default' => 1,
|
||||
'transition' => true,
|
||||
'sortable' => true,
|
||||
),
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'name' => 'date_start',
|
||||
'type' => 'datetime',
|
||||
'default' => null,
|
||||
@ -139,9 +139,9 @@ class Discount_Codes_Schema extends Schema {
|
||||
'sortable' => true,
|
||||
'transition' => true,
|
||||
'allow_null' => true,
|
||||
),
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'name' => 'date_expiration',
|
||||
'type' => 'datetime',
|
||||
'default' => null,
|
||||
@ -149,9 +149,9 @@ class Discount_Codes_Schema extends Schema {
|
||||
'sortable' => true,
|
||||
'transition' => true,
|
||||
'allow_null' => true,
|
||||
),
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'name' => 'date_created',
|
||||
'type' => 'datetime',
|
||||
'default' => null,
|
||||
@ -159,9 +159,9 @@ class Discount_Codes_Schema extends Schema {
|
||||
'date_query' => true,
|
||||
'sortable' => true,
|
||||
'allow_null' => true,
|
||||
),
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'name' => 'date_modified',
|
||||
'type' => 'datetime',
|
||||
'default' => null,
|
||||
@ -169,7 +169,7 @@ class Discount_Codes_Schema extends Schema {
|
||||
'date_query' => true,
|
||||
'sortable' => true,
|
||||
'allow_null' => true,
|
||||
),
|
||||
],
|
||||
|
||||
);
|
||||
];
|
||||
}
|
||||
|
Reference in New Issue
Block a user