CartsTable.php
8 months ago
ContactListsTable.php
11 months ago
DatabaseInterface.php
8 months ago
DatabaseTable.php
11 months ago
FormsTable.php
8 months ago
FormsTable.php
28 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Hostinger\Reach\Admin\Database; |
| 4 | |
| 5 | if ( ! defined( 'ABSPATH' ) ) { |
| 6 | die; |
| 7 | } |
| 8 | |
| 9 | class FormsTable extends DatabaseTable { |
| 10 | protected string $table_name = 'forms'; |
| 11 | |
| 12 | public function schema(): array { |
| 13 | return array( |
| 14 | 'id mediumint(9) NOT NULL AUTO_INCREMENT', |
| 15 | 'form_id varchar(255) NOT NULL', |
| 16 | 'form_title varchar(255)', |
| 17 | 'post_id int(11)', |
| 18 | 'contact_list_id int(11)', |
| 19 | 'type varchar(255) NOT NULL', |
| 20 | 'is_active tinyint(1) NOT NULL DEFAULT 1', |
| 21 | 'submissions INT UNSIGNED DEFAULT 0', |
| 22 | 'PRIMARY KEY (id)', |
| 23 | 'UNIQUE KEY form_id (form_id)', |
| 24 | 'KEY contact_list_id (contact_list_id)', |
| 25 | ); |
| 26 | } |
| 27 | } |
| 28 |