diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index 4f22206b3..1023b2f3b 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -584,6 +584,8 @@ public function getPropertiesFromTable($model) 'float', 'real', 'float4', 'double', 'float8' => 'float', + 'decimal', 'numeric' => 'numeric', + default => 'string', }; } diff --git a/tests/Console/ModelsCommand/AllowGlobDirectory/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/AllowGlobDirectory/__snapshots__/Test__test__1.php index 2b17017f1..e6786cf9b 100644 --- a/tests/Console/ModelsCommand/AllowGlobDirectory/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/AllowGlobDirectory/__snapshots__/Test__test__1.php @@ -42,8 +42,8 @@ * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/DoesNotGeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/DoesNotGeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php index 54411a6cc..ca5b265fc 100644 --- a/tests/Console/ModelsCommand/DoesNotGeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/DoesNotGeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php @@ -48,8 +48,8 @@ * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/GenerateBasicPhpDocWithEnumDefaults/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GenerateBasicPhpDocWithEnumDefaults/__snapshots__/Test__test__1.php index 46145aae7..48f10e240 100644 --- a/tests/Console/ModelsCommand/GenerateBasicPhpDocWithEnumDefaults/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GenerateBasicPhpDocWithEnumDefaults/__snapshots__/Test__test__1.php @@ -44,8 +44,8 @@ * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/GenerateBasicPhpdoc/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GenerateBasicPhpdoc/__snapshots__/Test__test__1.php index 5b12d69ea..41899c98a 100644 --- a/tests/Console/ModelsCommand/GenerateBasicPhpdoc/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GenerateBasicPhpdoc/__snapshots__/Test__test__1.php @@ -42,8 +42,8 @@ * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/GenerateBasicPhpdocCamel/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GenerateBasicPhpdocCamel/__snapshots__/Test__test__1.php index b041db784..1ddaa014a 100644 --- a/tests/Console/ModelsCommand/GenerateBasicPhpdocCamel/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GenerateBasicPhpdocCamel/__snapshots__/Test__test__1.php @@ -42,8 +42,8 @@ * @property float $floatNotNullable * @property float|null $doubleNullable * @property float $doubleNotNullable - * @property string|null $decimalNullable - * @property string $decimalNotNullable + * @property numeric|null $decimalNullable + * @property numeric $decimalNotNullable * @property int|null $booleanNullable * @property int $booleanNotNullable * @property string|null $enumNullable diff --git a/tests/Console/ModelsCommand/GenerateBasicPhpdocFinal/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GenerateBasicPhpdocFinal/__snapshots__/Test__test__1.php index 799c7aec7..267388a5b 100644 --- a/tests/Console/ModelsCommand/GenerateBasicPhpdocFinal/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GenerateBasicPhpdocFinal/__snapshots__/Test__test__1.php @@ -42,8 +42,8 @@ * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php index a194fd7b7..cd22c007d 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilder/__snapshots__/Test__test__1.php @@ -48,8 +48,8 @@ * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilderWithFqn/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilderWithFqn/__snapshots__/Test__test__1.php index 8683a319d..6efda0e40 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilderWithFqn/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithExternalEloquentBuilderWithFqn/__snapshots__/Test__test__1.php @@ -43,8 +43,8 @@ * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithForcedFqn/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithForcedFqn/__snapshots__/Test__test__1.php index b95c9da2c..a8006df63 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithForcedFqn/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithForcedFqn/__snapshots__/Test__test__1.php @@ -44,8 +44,8 @@ * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithFqn/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithFqn/__snapshots__/Test__test__1.php index b307b80e1..e1dc204be 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithFqn/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithFqn/__snapshots__/Test__test__1.php @@ -50,8 +50,8 @@ * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithFqnInExternalFile/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithFqnInExternalFile/__snapshots__/Test__test__1.php index b076bb206..85556a015 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithFqnInExternalFile/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithFqnInExternalFile/__snapshots__/Test__test__1.php @@ -48,8 +48,8 @@ * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/GeneratePhpdocWithMixin/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/GeneratePhpdocWithMixin/__snapshots__/Test__test__1.php index d6c9340f6..0aceca246 100644 --- a/tests/Console/ModelsCommand/GeneratePhpdocWithMixin/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/GeneratePhpdocWithMixin/__snapshots__/Test__test__1.php @@ -95,8 +95,8 @@ final class IdeHelperFinalPost {} * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/MagicWhere/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/MagicWhere/__snapshots__/Test__test__1.php index e550fca41..1338230b5 100644 --- a/tests/Console/ModelsCommand/MagicWhere/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/MagicWhere/__snapshots__/Test__test__1.php @@ -42,8 +42,8 @@ * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/QueryScopes/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/QueryScopes/__snapshots__/Test__test__1.php index e6b258889..70cec8fa9 100644 --- a/tests/Console/ModelsCommand/QueryScopes/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/QueryScopes/__snapshots__/Test__test__1.php @@ -81,8 +81,8 @@ protected function scopeSystem(Builder $query): void * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable diff --git a/tests/Console/ModelsCommand/RelationCountProperties/__snapshots__/Test__test__1.php b/tests/Console/ModelsCommand/RelationCountProperties/__snapshots__/Test__test__1.php index 48f72bf2d..651544c95 100644 --- a/tests/Console/ModelsCommand/RelationCountProperties/__snapshots__/Test__test__1.php +++ b/tests/Console/ModelsCommand/RelationCountProperties/__snapshots__/Test__test__1.php @@ -43,8 +43,8 @@ * @property float $float_not_nullable * @property float|null $double_nullable * @property float $double_not_nullable - * @property string|null $decimal_nullable - * @property string $decimal_not_nullable + * @property numeric|null $decimal_nullable + * @property numeric $decimal_not_nullable * @property int|null $boolean_nullable * @property int $boolean_not_nullable * @property string|null $enum_nullable