user-journey-model.php
41 lines
| 1 | <?php |
| 2 | |
| 3 | namespace JFB_Modules\User_Journey\Models; |
| 4 | |
| 5 | use Jet_Form_Builder\Db_Queries\Base_Db_Model; |
| 6 | |
| 7 | // If this file is called directly, abort. |
| 8 | if ( ! defined( 'WPINC' ) ) { |
| 9 | die; |
| 10 | } |
| 11 | |
| 12 | class User_Journey_Model extends Base_Db_Model { |
| 13 | |
| 14 | public static function table_name(): string { |
| 15 | return 'user_journey'; |
| 16 | } |
| 17 | |
| 18 | public static function schema(): array { |
| 19 | return array( |
| 20 | 'id' => 'bigint(20) NOT NULL AUTO_INCREMENT', |
| 21 | 'record_id' => 'bigint(20) UNSIGNED NOT NULL', |
| 22 | 'journey_step' => 'int(11) NOT NULL', |
| 23 | 'journey_url' => 'text NOT NULL', |
| 24 | 'journey_query' => 'text', |
| 25 | 'timestamp' => 'bigint(20) NOT NULL', |
| 26 | ); |
| 27 | } |
| 28 | |
| 29 | public static function schema_keys(): array { |
| 30 | return array( |
| 31 | 'id' => 'primary key', |
| 32 | 'record_id' => 'index', |
| 33 | ); |
| 34 | } |
| 35 | |
| 36 | public function related_migrations(): array { |
| 37 | return array(); |
| 38 | } |
| 39 | |
| 40 | } |
| 41 |