diff --git a/README.md b/README.md index 32f4abf..cb3bbee 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ $permissions = [ 'users' => ['name' => '用户管理', 'curd' => true, 'children' => ['balance' => '变更余额', 'password' => '重置密码']], 'user-balance' => ['name' => '余额流水', 'curd' => ['index', 'show']], + 'withdraw' => ['name' => '余额流水', 'curd' => ['index', 'show'], 'children' => ['check' => '审核']], ]; ``` @@ -53,9 +54,10 @@ $permissions = [ ```php $menus = [ - ['title' => '用户模块', 'icon' => 'feather icon-user', 'uri' => '/users', 'permission' => ['users', 'user_balance'], 'children' => [ + ['title' => '用户模块', 'icon' => 'feather icon-user', 'uri' => '/users', 'permission' => ['users', 'user_balance', 'withdraw'], 'children' => [ ['title' => '用户管理', 'icon' => '', 'uri' => '/users', 'permission' => 'users'], ['title' => '余额流水', 'icon' => '', 'uri' => '/user-balance', 'permission' => 'user_balance'], + ['title' => '提现管理', 'icon' => '', 'uri' => '/withdraw', 'permission' => 'withdraw'], ]], ]; ``` @@ -122,3 +124,20 @@ $menus = [ | is_default | int | not null | 0 | 默认地址 | | created_at | timestamp | null | - | 创建时间 | | updated_at | timestamp | null | - | 更新时间 | + +## 提现申请: user_withdraw + +| column | type | nullable | default | comment | +| - | - | - | - | - | +| id | bigint | not null | - | 主键 | +| user_id | bigint | not null | - | 外键关联 users.id | +| amount | decimal(12, 2) | not null | - | 数量 | +| balance | decimal(12, 2) | not null | - | 余额 | +| status | int | not null | 0 | 状态 | +| payee | json | null | - | 收款账户 | +| payer | json | null | - | 打款账户 | +| reason | varchar(191) | not null | - | 失败原因 | +| remarks | varchar(191) | not null | - | 备注 | +| finish_at | timestamp | null | - | 完成时间 | +| created_at | timestamp | null | - | 创建时间 | +| updated_at | timestamp | null | - | 更新时间 | diff --git a/src/Http/Admin/WithdrawController.php b/src/Http/Admin/WithdrawController.php index 5e18b38..11f6675 100644 --- a/src/Http/Admin/WithdrawController.php +++ b/src/Http/Admin/WithdrawController.php @@ -30,6 +30,7 @@ class WithdrawController extends AdminController $grid->column('user.phone'); $grid->column('amount'); $grid->column('status')->display(fn() => $this->status->label()); + $grid->column('reason'); $grid->column('created_at'); $grid->filter(function (Filter $filter) {