<?php

namespace App\Models;

class PaymentOrder extends BaseModel
{

    protected $table = 'payment_orders';
    protected $fillable = ['type', 'order_no', 'member_id', 'amount', 'channel', 'bank_name', 'account', 'card_no', 'status', 'callback_url', 'callback_data', 'remark', 'pay_no', 'pay_url', 'pay_data', 'fee'];


    public function userInfo()
    {
        return $this->belongsTo(User::class, 'member_id', 'member_id')->select(['member_id','username','first_name']);
    }
}