Initial Commit

This commit is contained in:
David Stone
2024-11-30 18:24:12 -07:00
commit e8f7955c1c
5432 changed files with 1397750 additions and 0 deletions

View File

@ -0,0 +1,136 @@
<?php
/**
* Webhook schema class
*
* @package WP_Ultimo
* @subpackage Database\Webhooks
* @since 2.0.0
*/
namespace WP_Ultimo\Database\Webhooks;
use WP_Ultimo\Database\Engine\Schema;
// Exit if accessed directly
defined('ABSPATH') || exit;
/**
* Webhooks Schema Class.
*
* @since 2.0.0
*/
class Webhooks_Schema extends Schema {
/**
* Array of database column objects
*
* @since 2.0.0
* @access public
* @var array
*/
public $columns = array(
array(
'name' => 'id',
'type' => 'bigint',
'length' => '20',
'unsigned' => true,
'extra' => 'auto_increment',
'primary' => true,
'sortable' => true,
),
array(
'name' => 'migrated_from_id',
'type' => 'bigint',
'length' => '20',
'unsigned' => true,
'sortable' => true,
'allow_null' => true,
),
array(
'name' => 'name',
'type' => 'varchar',
'searchable' => true,
'sortable' => true,
),
array(
'name' => 'webhook_url',
'type' => 'varchar',
'searchable' => true,
'sortable' => true,
),
array(
'name' => 'event',
'type' => 'varchar',
'searchable' => true,
'sortable' => true,
),
array(
'name' => 'event_count',
'type' => 'int',
'length' => '10',
'default' => 0,
'sortable' => true,
'aliases' => array('sent_events_count'),
),
array(
'name' => 'active',
'type' => 'tinyint',
'length' => '4',
'unsigned' => true,
'default' => 1,
'transition' => true,
'sortable' => true,
),
array(
'name' => 'hidden',
'type' => 'tinyint',
'length' => '4',
'unsigned' => true,
'default' => 0,
'transition' => true,
'sortable' => true,
),
array(
'name' => 'integration',
'type' => 'varchar',
'searchable' => true,
'sortable' => true,
),
array(
'name' => 'date_last_failed',
'type' => 'datetime',
'date_query' => true,
'sortable' => true,
),
array(
'name' => 'date_created',
'type' => 'datetime',
'created' => true,
'date_query' => true,
'sortable' => true,
),
array(
'name' => 'date_modified',
'type' => 'datetime',
'default' => null,
'modified' => true,
'date_query' => true,
'sortable' => true,
'allow_null' => true,
),
);
} // end class Webhooks_Schema;