<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\PaymentTransaction
 *
 * @property int $id
 * @property int $shopping_payment_id
 * @property string $request
 * @property int|null $txid
 * @property int|null $userid
 * @property string|null $status
 * @property string|null $key
 * @property string|null $txaction
 * @property array|null $transmitted_data
 * @property int|null $errorcode
 * @property string|null $errormessage
 * @property string|null $customermessage
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property-read \App\Models\ShoppingPayment $shopping_payment
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereCustomermessage($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereErrorcode($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereErrormessage($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereKey($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereRequest($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereShoppingPaymentId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereStatus($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereTransmittedData($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereTxaction($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereTxid($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereUserid($value)
 * @mixin \Eloquent
 * @property string|null $mode
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentTransaction whereMode($value)
 */
class PaymentTransaction extends Model
{
    protected $table = 'payment_transactions';


    protected $casts = [
        'transmitted_data' => 'array'
        ];

    protected $fillable = [
        'shopping_payment_id',
        'request',
        'txid',
        'userid',
        'status',
        'key',
        'txaction',
        'transmitted_data',
        'errorcode',
        'errormessage',
        'customermessage',
        'mode',
    ];


    public function shopping_payment()
    {
        return $this->belongsTo('App\Models\ShoppingPayment','shopping_payment_id');
    }
}
