feat: 添加 JWT 支持与开发环境配置,更新 API 路由与中间件
This commit is contained in:
36
app/Models/PlayerWallet.php
Normal file
36
app/Models/PlayerWallet.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* 彩票侧余额(表 player_wallets),按 player + wallet_type + currency 唯一。
|
||||
*/
|
||||
class PlayerWallet extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'player_id',
|
||||
'wallet_type',
|
||||
'currency_code',
|
||||
'balance',
|
||||
'frozen_balance',
|
||||
'status',
|
||||
'version',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'balance' => 'integer',
|
||||
'frozen_balance' => 'integer',
|
||||
'version' => 'integer',
|
||||
];
|
||||
}
|
||||
|
||||
public function player(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Player::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user