<?php

namespace app\common\model;

use support\think\Model;

class AdminWithdrawOrder extends Model
{
    protected $name = 'admin_withdraw_order';

    protected $autoWriteTimestamp = true;

    protected $type = [
        'create_time' => 'integer',
        'update_time' => 'integer',
        'review_time' => 'integer',
        'amount' => 'string',
        'actual_amount' => 'string',
        'status' => 'integer',
    ];

    public function admin(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\admin\model\Admin::class, 'admin_id', 'id');
    }

    public function channel(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(Channel::class, 'channel_id', 'id');
    }

    public function reviewAdmin(): \think\model\relation\BelongsTo
    {
        return $this->belongsTo(\app\admin\model\Admin::class, 'review_admin_id', 'id');
    }
}

