PluginProbe
JetFormBuilder — Dynamic Blocks Form Builder / 3.1.3
JetFormBuilder — Dynamic Blocks Form Builder v3.1.3
3.6.5.2 3.6.5.1 3.6.5 3.6.4.2 3.6.4.1 3.6.4 3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 All 130 releases
jetformbuilder / modules / gateways / db-models / payer-shipping-model.php
payer-shipping-model.php
59 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3
4 namespace JFB_Modules\Gateways\Db_Models;
5
6 use Jet_Form_Builder\Db_Queries\Base_Db_Model;
7 use JFB_Modules\Gateways\Db_Models\Constraints\Payer_Model_Constraint;
8
9 // If this file is called directly, abort.
10 if ( ! defined( 'WPINC' ) ) {
11 die;
12 }
13
14 class Payer_Shipping_Model extends Base_Db_Model {
15
16 /**
17 * @inheritDoc
18 */
19 public static function table_name(): string {
20 return 'payers_shipping';
21 }
22
23 /**
24 * @inheritDoc
25 */
26 public static function schema(): array {
27 return array(
28 'id' => 'bigint(20) NOT NULL AUTO_INCREMENT',
29 'payer_id' => 'bigint(20)',
30 'full_name' => 'varchar(255)',
31 'address_line_1' => 'varchar(255)',
32 'address_line_2' => 'varchar(255)',
33 'admin_area_2' => 'varchar(255)',
34 'admin_area_1' => 'varchar(255)',
35 'postal_code' => 'varchar(100)',
36 'country_code' => 'varchar(100)',
37 'created_at' => 'TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP',
38 'updated_at' => 'TIMESTAMP NOT NULL',
39 );
40 }
41
42 /**
43 * @inheritDoc
44 */
45 public static function schema_keys(): array {
46 return array(
47 'id' => 'primary key',
48 'payer_id' => 'index',
49 );
50 }
51
52 public function foreign_relations(): array {
53 return array(
54 new Payer_Model_Constraint(),
55 );
56 }
57
58 }
59