Skip to content

Commit 5187c16

Browse files
committed
Update dependencies
1 parent 0240ab6 commit 5187c16

26 files changed

+524
-299
lines changed

SOB/PHPFUI/Record/Definition/Customer.php

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,40 @@ abstract class Customer extends \PHPFUI\ORM\Record
2929
{
3030
protected static bool $autoIncrement = true;
3131

32-
/** @var array<string, array<mixed>> */
33-
protected static array $fields = [
34-
// MYSQL_TYPE, PHP_TYPE, LENGTH, ALLOWS_NULL, DEFAULT
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-
'customer_id' => ['integer', 'int', 0, false, ],
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, ],
53-
];
32+
/** @var array<string, \PHPFUI\ORM\FieldDefinition> */
33+
protected static array $fields = [];
5434

5535
/** @var array<string> */
5636
protected static array $primaryKeys = ['customer_id', ];
5737

5838
protected static string $table = 'customer';
39+
40+
public function initFieldDefinitions() : static
41+
{
42+
if (! count(static::$fields))
43+
{
44+
static::$fields = [
45+
'address' => new \PHPFUI\ORM\FieldDefinition('longtext', 'string', 4294967295, true, null, ),
46+
'attachments' => new \PHPFUI\ORM\FieldDefinition('longblob', 'string', 0, true, null, ),
47+
'business_phone' => new \PHPFUI\ORM\FieldDefinition('varchar(25)', 'string', 25, true, null, ),
48+
'city' => new \PHPFUI\ORM\FieldDefinition('varchar(50)', 'string', 50, true, null, ),
49+
'company' => new \PHPFUI\ORM\FieldDefinition('varchar(50)', 'string', 50, true, null, ),
50+
'country_region' => new \PHPFUI\ORM\FieldDefinition('varchar(50)', 'string', 50, true, null, ),
51+
'customer_id' => new \PHPFUI\ORM\FieldDefinition('integer', 'int', 0, false, ),
52+
'email_address' => new \PHPFUI\ORM\FieldDefinition('varchar(50)', 'string', 50, true, null, ),
53+
'fax_number' => new \PHPFUI\ORM\FieldDefinition('varchar(25)', 'string', 25, true, null, ),
54+
'first_name' => new \PHPFUI\ORM\FieldDefinition('varchar(50)', 'string', 50, true, null, ),
55+
'home_phone' => new \PHPFUI\ORM\FieldDefinition('varchar(25)', 'string', 25, true, null, ),
56+
'job_title' => new \PHPFUI\ORM\FieldDefinition('varchar(50)', 'string', 50, true, null, ),
57+
'last_name' => new \PHPFUI\ORM\FieldDefinition('varchar(50)', 'string', 50, true, null, ),
58+
'mobile_phone' => new \PHPFUI\ORM\FieldDefinition('varchar(25)', 'string', 25, true, null, ),
59+
'notes' => new \PHPFUI\ORM\FieldDefinition('longtext', 'string', 4294967295, true, null, ),
60+
'state_province' => new \PHPFUI\ORM\FieldDefinition('varchar(50)', 'string', 50, true, null, ),
61+
'web_page' => new \PHPFUI\ORM\FieldDefinition('longtext', 'string', 4294967295, true, null, ),
62+
'zip_postal_code' => new \PHPFUI\ORM\FieldDefinition('varchar(15)', 'string', 15, true, null, ),
63+
];
64+
}
65+
66+
return $this;
67+
}
5968
}

SOB/PHPFUI/Record/Definition/DateRecord.php

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,29 @@ abstract class DateRecord extends \PHPFUI\ORM\Record
1717
{
1818
protected static bool $autoIncrement = true;
1919

20-
/** @var array<string, array<mixed>> */
21-
protected static array $fields = [
22-
// MYSQL_TYPE, PHP_TYPE, LENGTH, ALLOWS_NULL, DEFAULT
23-
'dateDefaultNotNull' => ['date', 'string', 10, false, '2000-01-02', ],
24-
'dateDefaultNull' => ['date', 'string', 10, true, NULL, ],
25-
'dateDefaultNullable' => ['date', 'string', 10, true, '2000-01-02', ],
26-
'dateRecordId' => ['integer', 'int', 0, false, ],
27-
'dateRequired' => ['date', 'string', 10, false, ],
28-
'timestampDefaultCurrentNotNull' => ['timestamp', 'string', 20, false, NULL, ],
29-
'timestampDefaultCurrentNullable' => ['timestamp', 'string', 20, true, NULL, ],
30-
];
20+
/** @var array<string, \PHPFUI\ORM\FieldDefinition> */
21+
protected static array $fields = [];
3122

3223
/** @var array<string> */
3324
protected static array $primaryKeys = ['dateRecordId', ];
3425

3526
protected static string $table = 'dateRecord';
27+
28+
public function initFieldDefinitions() : static
29+
{
30+
if (! count(static::$fields))
31+
{
32+
static::$fields = [
33+
'dateDefaultNotNull' => new \PHPFUI\ORM\FieldDefinition('date', 'string', 10, false, '2000-01-02', ),
34+
'dateDefaultNull' => new \PHPFUI\ORM\FieldDefinition('date', 'string', 10, true, null, ),
35+
'dateDefaultNullable' => new \PHPFUI\ORM\FieldDefinition('date', 'string', 10, true, '2000-01-02', ),
36+
'dateRecordId' => new \PHPFUI\ORM\FieldDefinition('integer', 'int', 0, false, ),
37+
'dateRequired' => new \PHPFUI\ORM\FieldDefinition('date', 'string', 10, false, ),
38+
'timestampDefaultCurrentNotNull' => new \PHPFUI\ORM\FieldDefinition('timestamp', 'string', 20, false, 'CURRENT_TIMESTAMP', ),
39+
'timestampDefaultCurrentNullable' => new \PHPFUI\ORM\FieldDefinition('timestamp', 'string', 20, true, 'CURRENT_TIMESTAMP', ),
40+
];
41+
}
42+
43+
return $this;
44+
}
3645
}

SOB/PHPFUI/Record/Definition/Employee.php

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,40 @@ abstract class Employee extends \PHPFUI\ORM\Record
2929
{
3030
protected static bool $autoIncrement = true;
3131

32-
/** @var array<string, array<mixed>> */
33-
protected static array $fields = [
34-
// MYSQL_TYPE, PHP_TYPE, LENGTH, ALLOWS_NULL, DEFAULT
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, ],
42-
'employee_id' => ['integer', 'int', 0, false, ],
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, ],
53-
];
32+
/** @var array<string, \PHPFUI\ORM\FieldDefinition> */
33+
protected static array $fields = [];
5434

5535
/** @var array<string> */
5636
protected static array $primaryKeys = ['employee_id', ];
5737

5838
protected static string $table = 'employee';
39+
40+
public function initFieldDefinitions() : static
41+
{
42+
if (! count(static::$fields))
43+
{
44+
static::$fields = [
45+
'address' => new \PHPFUI\ORM\FieldDefinition('longtext', 'string', 4294967295, true, null, ),
46+
'attachments' => new \PHPFUI\ORM\FieldDefinition('longblob', 'string', 0, true, null, ),
47+
'business_phone' => new \PHPFUI\ORM\FieldDefinition('varchar(25)', 'string', 25, true, null, ),
48+
'city' => new \PHPFUI\ORM\FieldDefinition('varchar(50)', 'string', 50, true, null, ),
49+
'company' => new \PHPFUI\ORM\FieldDefinition('varchar(50)', 'string', 50, true, null, ),
50+
'country_region' => new \PHPFUI\ORM\FieldDefinition('varchar(50)', 'string', 50, true, null, ),
51+
'email_address' => new \PHPFUI\ORM\FieldDefinition('varchar(50)', 'string', 50, true, null, ),
52+
'employee_id' => new \PHPFUI\ORM\FieldDefinition('integer', 'int', 0, false, ),
53+
'fax_number' => new \PHPFUI\ORM\FieldDefinition('varchar(25)', 'string', 25, true, null, ),
54+
'first_name' => new \PHPFUI\ORM\FieldDefinition('varchar(50)', 'string', 50, true, null, ),
55+
'home_phone' => new \PHPFUI\ORM\FieldDefinition('varchar(25)', 'string', 25, true, null, ),
56+
'job_title' => new \PHPFUI\ORM\FieldDefinition('varchar(50)', 'string', 50, true, null, ),
57+
'last_name' => new \PHPFUI\ORM\FieldDefinition('varchar(50)', 'string', 50, true, null, ),
58+
'mobile_phone' => new \PHPFUI\ORM\FieldDefinition('varchar(25)', 'string', 25, true, null, ),
59+
'notes' => new \PHPFUI\ORM\FieldDefinition('longtext', 'string', 4294967295, true, null, ),
60+
'state_province' => new \PHPFUI\ORM\FieldDefinition('varchar(50)', 'string', 50, true, null, ),
61+
'web_page' => new \PHPFUI\ORM\FieldDefinition('longtext', 'string', 4294967295, true, null, ),
62+
'zip_postal_code' => new \PHPFUI\ORM\FieldDefinition('varchar(15)', 'string', 15, true, null, ),
63+
];
64+
}
65+
66+
return $this;
67+
}
5968
}

SOB/PHPFUI/Record/Definition/EmployeePrivilege.php

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,24 @@ abstract class EmployeePrivilege extends \PHPFUI\ORM\Record
1414
{
1515
protected static bool $autoIncrement = false;
1616

17-
/** @var array<string, array<mixed>> */
18-
protected static array $fields = [
19-
// MYSQL_TYPE, PHP_TYPE, LENGTH, ALLOWS_NULL, DEFAULT
20-
'employee_id' => ['integer', 'int', 0, false, ],
21-
'privilege_id' => ['integer', 'int', 0, false, ],
22-
];
17+
/** @var array<string, \PHPFUI\ORM\FieldDefinition> */
18+
protected static array $fields = [];
2319

2420
/** @var array<string> */
2521
protected static array $primaryKeys = [];
2622

2723
protected static string $table = 'employee_privilege';
24+
25+
public function initFieldDefinitions() : static
26+
{
27+
if (! count(static::$fields))
28+
{
29+
static::$fields = [
30+
'employee_id' => new \PHPFUI\ORM\FieldDefinition('integer', 'int', 0, false, ),
31+
'privilege_id' => new \PHPFUI\ORM\FieldDefinition('integer', 'int', 0, false, ),
32+
];
33+
}
34+
35+
return $this;
36+
}
2837
}

SOB/PHPFUI/Record/Definition/Image.php

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,26 @@ abstract class Image extends \PHPFUI\ORM\Record
1515
{
1616
protected static bool $autoIncrement = true;
1717

18-
/** @var array<string, array<mixed>> */
19-
protected static array $fields = [
20-
// MYSQL_TYPE, PHP_TYPE, LENGTH, ALLOWS_NULL, DEFAULT
21-
'image_id' => ['integer', 'int', 0, false, ],
22-
'imageable_id' => ['integer', 'int', 0, true, ],
23-
'imageable_type' => ['varchar(128)', 'string', 128, true, ],
24-
'path' => ['varchar(128)', 'string', 128, false, ],
25-
];
18+
/** @var array<string, \PHPFUI\ORM\FieldDefinition> */
19+
protected static array $fields = [];
2620

2721
/** @var array<string> */
2822
protected static array $primaryKeys = ['image_id', ];
2923

3024
protected static string $table = 'image';
25+
26+
public function initFieldDefinitions() : static
27+
{
28+
if (! count(static::$fields))
29+
{
30+
static::$fields = [
31+
'image_id' => new \PHPFUI\ORM\FieldDefinition('integer', 'int', 0, false, ),
32+
'imageable_id' => new \PHPFUI\ORM\FieldDefinition('integer', 'int', 0, true, ),
33+
'imageable_type' => new \PHPFUI\ORM\FieldDefinition('varchar(128)', 'string', 128, true, ),
34+
'path' => new \PHPFUI\ORM\FieldDefinition('varchar(128)', 'string', 128, false, ),
35+
];
36+
}
37+
38+
return $this;
39+
}
3140
}

SOB/PHPFUI/Record/Definition/InventoryTransaction.php

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,31 @@ abstract class InventoryTransaction extends \PHPFUI\ORM\Record
2424
{
2525
protected static bool $autoIncrement = true;
2626

27-
/** @var array<string, array<mixed>> */
28-
protected static array $fields = [
29-
// MYSQL_TYPE, PHP_TYPE, LENGTH, ALLOWS_NULL, DEFAULT
30-
'comments' => ['varchar(255)', 'string', 255, true, NULL, ],
31-
'inventory_transaction_id' => ['integer', 'int', 0, false, ],
32-
'inventory_transaction_type_id' => ['integer', 'int', 0, false, ],
33-
'order_id' => ['integer', 'int', 0, true, NULL, ],
34-
'product_id' => ['integer', 'int', 0, false, ],
35-
'purchase_order_id' => ['integer', 'int', 0, true, NULL, ],
36-
'quantity' => ['integer', 'int', 0, false, ],
37-
'transaction_created_date' => ['datetime', 'string', 20, false, NULL, ],
38-
'transaction_modified_date' => ['datetime', 'string', 20, false, NULL, ],
39-
];
27+
/** @var array<string, \PHPFUI\ORM\FieldDefinition> */
28+
protected static array $fields = [];
4029

4130
/** @var array<string> */
4231
protected static array $primaryKeys = ['inventory_transaction_id', ];
4332

4433
protected static string $table = 'inventory_transaction';
34+
35+
public function initFieldDefinitions() : static
36+
{
37+
if (! count(static::$fields))
38+
{
39+
static::$fields = [
40+
'comments' => new \PHPFUI\ORM\FieldDefinition('varchar(255)', 'string', 255, true, null, ),
41+
'inventory_transaction_id' => new \PHPFUI\ORM\FieldDefinition('integer', 'int', 0, false, ),
42+
'inventory_transaction_type_id' => new \PHPFUI\ORM\FieldDefinition('integer', 'int', 0, false, ),
43+
'order_id' => new \PHPFUI\ORM\FieldDefinition('integer', 'int', 0, true, NULL, ),
44+
'product_id' => new \PHPFUI\ORM\FieldDefinition('integer', 'int', 0, false, ),
45+
'purchase_order_id' => new \PHPFUI\ORM\FieldDefinition('integer', 'int', 0, true, NULL, ),
46+
'quantity' => new \PHPFUI\ORM\FieldDefinition('integer', 'int', 0, false, ),
47+
'transaction_created_date' => new \PHPFUI\ORM\FieldDefinition('datetime', 'string', 20, false, 'CURRENT_TIMESTAMP', ),
48+
'transaction_modified_date' => new \PHPFUI\ORM\FieldDefinition('datetime', 'string', 20, false, 'CURRENT_TIMESTAMP', ),
49+
];
50+
}
51+
52+
return $this;
53+
}
4554
}

SOB/PHPFUI/Record/Definition/InventoryTransactionType.php

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,24 @@ abstract class InventoryTransactionType extends \PHPFUI\ORM\Record
1313
{
1414
protected static bool $autoIncrement = false;
1515

16-
/** @var array<string, array<mixed>> */
17-
protected static array $fields = [
18-
// MYSQL_TYPE, PHP_TYPE, LENGTH, ALLOWS_NULL, DEFAULT
19-
'inventory_transaction_type_id' => ['integer', 'int', 0, false, ],
20-
'inventory_transaction_type_name' => ['varchar(50)', 'string', 50, false, ],
21-
];
16+
/** @var array<string, \PHPFUI\ORM\FieldDefinition> */
17+
protected static array $fields = [];
2218

2319
/** @var array<string> */
2420
protected static array $primaryKeys = ['inventory_transaction_type_id', ];
2521

2622
protected static string $table = 'inventory_transaction_type';
23+
24+
public function initFieldDefinitions() : static
25+
{
26+
if (! count(static::$fields))
27+
{
28+
static::$fields = [
29+
'inventory_transaction_type_id' => new \PHPFUI\ORM\FieldDefinition('integer', 'int', 0, false, ),
30+
'inventory_transaction_type_name' => new \PHPFUI\ORM\FieldDefinition('varchar(50)', 'string', 50, false, ),
31+
];
32+
}
33+
34+
return $this;
35+
}
2736
}

SOB/PHPFUI/Record/Definition/Invoice.php

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,29 @@ abstract class Invoice extends \PHPFUI\ORM\Record
1919
{
2020
protected static bool $autoIncrement = true;
2121

22-
/** @var array<string, array<mixed>> */
23-
protected static array $fields = [
24-
// MYSQL_TYPE, PHP_TYPE, LENGTH, ALLOWS_NULL, DEFAULT
25-
'amount_due' => ['decimal(19,4)', 'float', 19, true, 0.0000, ],
26-
'due_date' => ['datetime', 'string', 20, true, NULL, ],
27-
'invoice_date' => ['datetime', 'string', 20, false, NULL, ],
28-
'invoice_id' => ['integer', 'int', 0, false, ],
29-
'order_id' => ['integer', 'int', 0, true, NULL, ],
30-
'shipping' => ['decimal(19,4)', 'float', 19, true, 0.0000, ],
31-
'tax' => ['decimal(19,4)', 'float', 19, true, 0.0000, ],
32-
];
22+
/** @var array<string, \PHPFUI\ORM\FieldDefinition> */
23+
protected static array $fields = [];
3324

3425
/** @var array<string> */
3526
protected static array $primaryKeys = ['invoice_id', ];
3627

3728
protected static string $table = 'invoice';
29+
30+
public function initFieldDefinitions() : static
31+
{
32+
if (! count(static::$fields))
33+
{
34+
static::$fields = [
35+
'amount_due' => new \PHPFUI\ORM\FieldDefinition('decimal(19,4)', 'float', 19, true, 0.0000, ),
36+
'due_date' => new \PHPFUI\ORM\FieldDefinition('datetime', 'string', 20, true, null, ),
37+
'invoice_date' => new \PHPFUI\ORM\FieldDefinition('datetime', 'string', 20, false, 'CURRENT_TIMESTAMP', ),
38+
'invoice_id' => new \PHPFUI\ORM\FieldDefinition('integer', 'int', 0, false, ),
39+
'order_id' => new \PHPFUI\ORM\FieldDefinition('integer', 'int', 0, true, NULL, ),
40+
'shipping' => new \PHPFUI\ORM\FieldDefinition('decimal(19,4)', 'float', 19, true, 0.0000, ),
41+
'tax' => new \PHPFUI\ORM\FieldDefinition('decimal(19,4)', 'float', 19, true, 0.0000, ),
42+
];
43+
}
44+
45+
return $this;
46+
}
3847
}

SOB/PHPFUI/Record/Definition/Migration.php

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,24 @@ abstract class Migration extends \PHPFUI\ORM\Record
1212
{
1313
protected static bool $autoIncrement = false;
1414

15-
/** @var array<string, array<mixed>> */
16-
protected static array $fields = [
17-
// MYSQL_TYPE, PHP_TYPE, LENGTH, ALLOWS_NULL, DEFAULT
18-
'migrationId' => ['int', 'int', 0, false, ],
19-
'ran' => ['timestamp', 'string', 20, true, NULL, ],
20-
];
15+
/** @var array<string, \PHPFUI\ORM\FieldDefinition> */
16+
protected static array $fields = [];
2117

2218
/** @var array<string> */
2319
protected static array $primaryKeys = ['migrationId', ];
2420

2521
protected static string $table = 'migration';
22+
23+
public function initFieldDefinitions() : static
24+
{
25+
if (! count(static::$fields))
26+
{
27+
static::$fields = [
28+
'migrationId' => new \PHPFUI\ORM\FieldDefinition('int', 'int', 0, false, ),
29+
'ran' => new \PHPFUI\ORM\FieldDefinition('timestamp', 'string', 20, true, 'CURRENT_TIMESTAMP', ),
30+
];
31+
}
32+
33+
return $this;
34+
}
2635
}

0 commit comments

Comments
 (0)