30 lines
615 B
PHP
30 lines
615 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class BalanceTransaction extends Model
|
|
{
|
|
public const TYPE_DEPOSIT = 'deposit';
|
|
|
|
public const TYPE_SPEND = 'spend';
|
|
|
|
public const TYPE_ADMIN_CREDIT = 'admin_credit';
|
|
|
|
public const TYPE_ADMIN_DEBIT = 'admin_debit';
|
|
|
|
protected $connection = 'azerothcore_auth';
|
|
|
|
protected $table = 'balance_transactions';
|
|
|
|
protected $guarded = [];
|
|
|
|
public const UPDATED_AT = null;
|
|
|
|
protected function casts(): array
|
|
{
|
|
return ['amount' => 'decimal:2', 'balance_after' => 'decimal:2', 'metadata' => 'array'];
|
|
}
|
|
}
|