Skip to content

Commit 686d449

Browse files
committed
Refresh PHPFUI models
1 parent c5bbd44 commit 686d449

31 files changed

+189
-148
lines changed

SOB/Cake/scaffolding/generateModels.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
include __DIR__ . '/../../../vendor/autoload.php';
44

5-
$schema = new \SOB\Schema();
5+
$schema = new \SOB\SchemaLoader();
66

77
echo "Generate Record Models\n\n";
88

SOB/CakeCached/scaffolding/generateModels.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
include __DIR__ . '/../../../vendor/autoload.php';
44

5-
$schema = new \SOB\Schema();
5+
$schema = new \SOB\SchemaLoader();
66

77
echo "Generate Record Models\n\n";
88

SOB/Doctrine/scaffolding/generateModels.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
include __DIR__ . '/../../../vendor/autoload.php';
44

5-
$schema = new \SOB\Schema();
5+
$schema = new \SOB\SchemaLoader();
66

77
echo "Generate Record Models\n\n";
88

SOB/Eloquent/scaffolding/generateModels.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
include __DIR__ . '/../../../vendor/autoload.php';
44

5-
$schema = new \SOB\Schema();
5+
$schema = new \SOB\SchemaLoader();
66

77
echo "Generate Record Models\n\n";
88

SOB/PHPFUI/Record/Definition/Customer.php

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* @property ?string $company MySQL type varchar(50)
1313
* @property ?string $country_region MySQL type varchar(50)
1414
* @property int $customer_id MySQL type integer
15+
* @property \SOB\PHPFUI\Record\Customer $customer related record
1516
* @property ?string $email_address MySQL type varchar(50)
1617
* @property ?string $fax_number MySQL type varchar(25)
1718
* @property ?string $first_name MySQL type varchar(50)
@@ -31,24 +32,24 @@ abstract class Customer extends \PHPFUI\ORM\Record
3132
/** @var array<string, array<mixed>> */
3233
protected static array $fields = [
3334
// MYSQL_TYPE, PHP_TYPE, LENGTH, ALLOWS_NULL, DEFAULT
34-
'address' => ['longtext', 'string', 4294967295, true, null, ],
35-
'attachments' => ['longblob', 'string', 0, true, null, ],
36-
'business_phone' => ['varchar(25)', 'string', 25, true, null, ],
37-
'city' => ['varchar(50)', 'string', 50, true, null, ],
38-
'company' => ['varchar(50)', 'string', 50, true, null, ],
39-
'country_region' => ['varchar(50)', 'string', 50, true, null, ],
35+
'address' => ['longtext', 'string', 4294967295, true, NULL, ],
36+
'attachments' => ['longblob', 'string', 0, true, NULL, ],
37+
'business_phone' => ['varchar(25)', 'string', 25, true, NULL, ],
38+
'city' => ['varchar(50)', 'string', 50, true, NULL, ],
39+
'company' => ['varchar(50)', 'string', 50, true, NULL, ],
40+
'country_region' => ['varchar(50)', 'string', 50, true, NULL, ],
4041
'customer_id' => ['integer', 'int', 0, false, ],
41-
'email_address' => ['varchar(50)', 'string', 50, true, null, ],
42-
'fax_number' => ['varchar(25)', 'string', 25, true, null, ],
43-
'first_name' => ['varchar(50)', 'string', 50, true, null, ],
44-
'home_phone' => ['varchar(25)', 'string', 25, true, null, ],
45-
'job_title' => ['varchar(50)', 'string', 50, true, null, ],
46-
'last_name' => ['varchar(50)', 'string', 50, true, null, ],
47-
'mobile_phone' => ['varchar(25)', 'string', 25, true, null, ],
48-
'notes' => ['longtext', 'string', 4294967295, true, null, ],
49-
'state_province' => ['varchar(50)', 'string', 50, true, null, ],
50-
'web_page' => ['longtext', 'string', 4294967295, true, null, ],
51-
'zip_postal_code' => ['varchar(15)', 'string', 15, true, null, ],
42+
'email_address' => ['varchar(50)', 'string', 50, true, NULL, ],
43+
'fax_number' => ['varchar(25)', 'string', 25, true, NULL, ],
44+
'first_name' => ['varchar(50)', 'string', 50, true, NULL, ],
45+
'home_phone' => ['varchar(25)', 'string', 25, true, NULL, ],
46+
'job_title' => ['varchar(50)', 'string', 50, true, NULL, ],
47+
'last_name' => ['varchar(50)', 'string', 50, true, NULL, ],
48+
'mobile_phone' => ['varchar(25)', 'string', 25, true, NULL, ],
49+
'notes' => ['longtext', 'string', 4294967295, true, NULL, ],
50+
'state_province' => ['varchar(50)', 'string', 50, true, NULL, ],
51+
'web_page' => ['longtext', 'string', 4294967295, true, NULL, ],
52+
'zip_postal_code' => ['varchar(15)', 'string', 15, true, NULL, ],
5253
];
5354

5455
/** @var array<string> */

SOB/PHPFUI/Record/Definition/DateRecord.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ abstract class DateRecord extends \PHPFUI\ORM\Record
2121
protected static array $fields = [
2222
// MYSQL_TYPE, PHP_TYPE, LENGTH, ALLOWS_NULL, DEFAULT
2323
'dateDefaultNotNull' => ['date', 'string', 10, false, '2000-01-02', ],
24-
'dateDefaultNull' => ['date', 'string', 10, true, null, ],
24+
'dateDefaultNull' => ['date', 'string', 10, true, NULL, ],
2525
'dateDefaultNullable' => ['date', 'string', 10, true, '2000-01-02', ],
2626
'dateRecordId' => ['integer', 'int', 0, false, ],
2727
'dateRequired' => ['date', 'string', 10, false, ],
28-
'timestampDefaultCurrentNotNull' => ['timestamp', 'string', 20, false, null, ],
29-
'timestampDefaultCurrentNullable' => ['timestamp', 'string', 20, true, null, ],
28+
'timestampDefaultCurrentNotNull' => ['timestamp', 'string', 20, false, NULL, ],
29+
'timestampDefaultCurrentNullable' => ['timestamp', 'string', 20, true, NULL, ],
3030
];
3131

3232
/** @var array<string> */

SOB/PHPFUI/Record/Definition/Employee.php

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* @property ?string $country_region MySQL type varchar(50)
1414
* @property ?string $email_address MySQL type varchar(50)
1515
* @property int $employee_id MySQL type integer
16+
* @property \SOB\PHPFUI\Record\Employee $employee related record
1617
* @property ?string $fax_number MySQL type varchar(25)
1718
* @property ?string $first_name MySQL type varchar(50)
1819
* @property ?string $home_phone MySQL type varchar(25)
@@ -31,24 +32,24 @@ abstract class Employee extends \PHPFUI\ORM\Record
3132
/** @var array<string, array<mixed>> */
3233
protected static array $fields = [
3334
// MYSQL_TYPE, PHP_TYPE, LENGTH, ALLOWS_NULL, DEFAULT
34-
'address' => ['longtext', 'string', 4294967295, true, null, ],
35-
'attachments' => ['longblob', 'string', 0, true, null, ],
36-
'business_phone' => ['varchar(25)', 'string', 25, true, null, ],
37-
'city' => ['varchar(50)', 'string', 50, true, null, ],
38-
'company' => ['varchar(50)', 'string', 50, true, null, ],
39-
'country_region' => ['varchar(50)', 'string', 50, true, null, ],
40-
'email_address' => ['varchar(50)', 'string', 50, true, null, ],
35+
'address' => ['longtext', 'string', 4294967295, true, NULL, ],
36+
'attachments' => ['longblob', 'string', 0, true, NULL, ],
37+
'business_phone' => ['varchar(25)', 'string', 25, true, NULL, ],
38+
'city' => ['varchar(50)', 'string', 50, true, NULL, ],
39+
'company' => ['varchar(50)', 'string', 50, true, NULL, ],
40+
'country_region' => ['varchar(50)', 'string', 50, true, NULL, ],
41+
'email_address' => ['varchar(50)', 'string', 50, true, NULL, ],
4142
'employee_id' => ['integer', 'int', 0, false, ],
42-
'fax_number' => ['varchar(25)', 'string', 25, true, null, ],
43-
'first_name' => ['varchar(50)', 'string', 50, true, null, ],
44-
'home_phone' => ['varchar(25)', 'string', 25, true, null, ],
45-
'job_title' => ['varchar(50)', 'string', 50, true, null, ],
46-
'last_name' => ['varchar(50)', 'string', 50, true, null, ],
47-
'mobile_phone' => ['varchar(25)', 'string', 25, true, null, ],
48-
'notes' => ['longtext', 'string', 4294967295, true, null, ],
49-
'state_province' => ['varchar(50)', 'string', 50, true, null, ],
50-
'web_page' => ['longtext', 'string', 4294967295, true, null, ],
51-
'zip_postal_code' => ['varchar(15)', 'string', 15, true, null, ],
43+
'fax_number' => ['varchar(25)', 'string', 25, true, NULL, ],
44+
'first_name' => ['varchar(50)', 'string', 50, true, NULL, ],
45+
'home_phone' => ['varchar(25)', 'string', 25, true, NULL, ],
46+
'job_title' => ['varchar(50)', 'string', 50, true, NULL, ],
47+
'last_name' => ['varchar(50)', 'string', 50, true, NULL, ],
48+
'mobile_phone' => ['varchar(25)', 'string', 25, true, NULL, ],
49+
'notes' => ['longtext', 'string', 4294967295, true, NULL, ],
50+
'state_province' => ['varchar(50)', 'string', 50, true, NULL, ],
51+
'web_page' => ['longtext', 'string', 4294967295, true, NULL, ],
52+
'zip_postal_code' => ['varchar(15)', 'string', 15, true, NULL, ],
5253
];
5354

5455
/** @var array<string> */

SOB/PHPFUI/Record/Definition/EmployeePrivilege.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Autogenerated. Do not modify. Modify SQL table, then generate with \PHPFUI\ORM\Tool\Generate\CRUD class.
77
*
88
* @property int $employee_id MySQL type integer
9+
* @property \SOB\PHPFUI\Record\Employee $employee related record
910
* @property int $privilege_id MySQL type integer
1011
* @property \SOB\PHPFUI\Record\Privilege $privilege related record
1112
*/

SOB/PHPFUI/Record/Definition/Image.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Autogenerated. Do not modify. Modify SQL table, then generate with \PHPFUI\ORM\Tool\Generate\CRUD class.
77
*
88
* @property int $image_id MySQL type integer
9+
* @property \SOB\PHPFUI\Record\Image $image related record
910
* @property ?int $imageable_id MySQL type integer
1011
* @property ?string $imageable_type MySQL type varchar(128)
1112
* @property string $path MySQL type varchar(128)

SOB/PHPFUI/Record/Definition/InventoryTransaction.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@
77
*
88
* @property ?string $comments MySQL type varchar(255)
99
* @property int $inventory_transaction_id MySQL type integer
10+
* @property \SOB\PHPFUI\Record\InventoryTransaction $inventory_transaction related record
1011
* @property int $inventory_transaction_type_id MySQL type integer
12+
* @property \SOB\PHPFUI\Record\InventoryTransactionType $inventory_transaction_type related record
1113
* @property ?int $order_id MySQL type integer
14+
* @property \SOB\PHPFUI\Record\Order $order related record
1215
* @property int $product_id MySQL type integer
16+
* @property \SOB\PHPFUI\Record\Product $product related record
1317
* @property ?int $purchase_order_id MySQL type integer
18+
* @property \SOB\PHPFUI\Record\PurchaseOrder $purchase_order related record
1419
* @property int $quantity MySQL type integer
1520
* @property string $transaction_created_date MySQL type datetime
1621
* @property string $transaction_modified_date MySQL type datetime
@@ -22,15 +27,15 @@ abstract class InventoryTransaction extends \PHPFUI\ORM\Record
2227
/** @var array<string, array<mixed>> */
2328
protected static array $fields = [
2429
// MYSQL_TYPE, PHP_TYPE, LENGTH, ALLOWS_NULL, DEFAULT
25-
'comments' => ['varchar(255)', 'string', 255, true, null, ],
30+
'comments' => ['varchar(255)', 'string', 255, true, NULL, ],
2631
'inventory_transaction_id' => ['integer', 'int', 0, false, ],
2732
'inventory_transaction_type_id' => ['integer', 'int', 0, false, ],
28-
'order_id' => ['integer', 'int', 0, true, null, ],
33+
'order_id' => ['integer', 'int', 0, true, NULL, ],
2934
'product_id' => ['integer', 'int', 0, false, ],
30-
'purchase_order_id' => ['integer', 'int', 0, true, null, ],
35+
'purchase_order_id' => ['integer', 'int', 0, true, NULL, ],
3136
'quantity' => ['integer', 'int', 0, false, ],
32-
'transaction_created_date' => ['datetime', 'string', 20, false, null, ],
33-
'transaction_modified_date' => ['datetime', 'string', 20, false, null, ],
37+
'transaction_created_date' => ['datetime', 'string', 20, false, NULL, ],
38+
'transaction_modified_date' => ['datetime', 'string', 20, false, NULL, ],
3439
];
3540

3641
/** @var array<string> */

0 commit comments

Comments
 (0)