diff --git a/app/API/CreditCard/CreditCard.php b/app/API/CreditCard/CreditCard.php index 876be2b..85907e2 100644 --- a/app/API/CreditCard/CreditCard.php +++ b/app/API/CreditCard/CreditCard.php @@ -26,7 +26,7 @@ class CreditCard extends Model 'due_date' => 'integer', 'closing_date' => 'integer', 'interest_rate' => 'decimal:2', - 'limit' => 'decimal:2' + 'limit' => 'encrypted' ]; public function user(): BelongsTo diff --git a/database/migrations/2023_07_05_143846_create_credit_cards_table.php b/database/migrations/2023_07_05_143846_create_credit_cards_table.php index 6818d67..c8df6dd 100644 --- a/database/migrations/2023_07_05_143846_create_credit_cards_table.php +++ b/database/migrations/2023_07_05_143846_create_credit_cards_table.php @@ -18,7 +18,7 @@ public function up(): void $table->integer('due_date'); $table->integer('closing_date'); $table->decimal('interest_rate', 5, 2)->default(0); - $table->decimal('limit', 19, 4); + $table->text('limit'); $table->softDeletes(precision: 3); $table->timestamps(3); });