<?php

namespace App\Models;

class ManualAudit extends BaseModel
{
    public const STATUS_FAILED = 0;
    public const STATUS_SUCCESS = 1;

    protected $table = 'manual_audits';

    protected $hidden = [];

    protected $fillable = [
        'request_id',
        'request_hash',
        'admin_id',
        'balance_log_id',
        'member_id',
        'username',
        'first_name',
        'transaction_type',
        'change_type',
        'amount',
        'before_balance',
        'after_balance',
        'level_before',
        'level_before_name',
        'level_after',
        'level_after_name',
        'status',
        'remark',
        'failure_reason',
    ];

    protected $casts = [
        'admin_id' => 'integer',
        'balance_log_id' => 'integer',
        'amount' => 'decimal:10',
        'before_balance' => 'decimal:10',
        'after_balance' => 'decimal:10',
        'level_before' => 'integer',
        'level_after' => 'integer',
        'status' => 'integer',
    ];
}
