| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace App\Models;
- /** 冻结记录:人工冻结、人工解冻、提现冻结。 */
- class WalletFreezeRecord extends BaseModel
- {
- public const TYPE_MANUAL_FREEZE = 'manual_freeze';
- public const TYPE_MANUAL_UNFREEZE = 'manual_unfreeze';
- public const TYPE_WITHDRAW_HOLD = 'withdraw_hold';
- public const STATUS_FROZEN = 'frozen';
- public const STATUS_DONE = 'done';
- public const STATUS_HOLDING = 'holding';
- public const STATUS_RELEASED = 'released';
- public const STATUS_SETTLED = 'settled';
- public const TYPE_LABELS = [
- self::TYPE_MANUAL_FREEZE => '人工冻结',
- self::TYPE_MANUAL_UNFREEZE => '人工解冻',
- self::TYPE_WITHDRAW_HOLD => '提现冻结',
- ];
- public const STATUS_LABELS = [
- self::STATUS_FROZEN => '已冻结',
- self::STATUS_DONE => '已解冻',
- self::STATUS_HOLDING => '提现审核中',
- self::STATUS_RELEASED => '已退回余额',
- self::STATUS_SETTLED => '提现成功已扣除',
- ];
- protected $table = 'wallet_freeze_records';
- protected $hidden = ['updated_at'];
- protected $fillable = ['user_id', 'member_id', 'type', 'amount', 'wager_amount', 'reason', 'status', 'related_type',
- 'related_id', 'request_id', 'admin_id', 'before_available', 'after_available', 'before_frozen', 'after_frozen', 'finished_at'];
- public function member()
- {
- return $this->belongsTo(User::class, 'member_id', 'member_id')->select(['id', 'member_id', 'username', 'account', 'first_name']);
- }
- }
|