Skip to content

Commit 29c4f05

Browse files
committed
feat: use numeric-string type on fields with decimal casts
1 parent 643329d commit 29c4f05

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Console/ModelsCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,8 @@ public function castPropertiesType($model)
381381
$realType = 'bool';
382382
break;
383383
case 'decimal':
384+
$realType = 'numeric-string';
385+
break;
384386
case 'string':
385387
case 'hashed':
386388
$realType = 'string';

tests/Console/ModelsCommand/SimpleCasts/__snapshots__/Test__test__1.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* @property float $cast_to_real
1515
* @property float $cast_to_float
1616
* @property float $cast_to_double
17-
* @property string $cast_to_decimal
17+
* @property numeric-string $cast_to_decimal
1818
* @property string $cast_to_string
1919
* @property bool $cast_to_bool
2020
* @property bool $cast_to_boolean

0 commit comments

Comments
 (0)