feat: implement deposit request validation and transaction API, refactor client routes, and update transaction schema.

This commit is contained in:
pbao9
2026-02-18 21:17:13 +07:00
parent 31cbdf323f
commit 9a2cab4521
12 changed files with 371 additions and 175 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace App\Enums;
enum TransactionStatus: int
{
case PENDING = 0;
case COMPLETED = 1;
case FAILED = 2;
public function label(): string
{
return match ($this) {
self::PENDING => 'Chờ xử lý',
self::COMPLETED => 'Thành công',
self::FAILED => 'Thất bại',
};
}
public static function getOptions(): array
{
return [
self::PENDING->value => self::PENDING->label(),
self::COMPLETED->value => self::COMPLETED->label(),
self::FAILED->value => self::FAILED->label(),
];
}
}