<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class GroupTransaction extends Model
{
    protected $table = 'group_transactions';
    
    /**
     * @return BelongsTo
     */
    public function group(): BelongsTo
    {
        return $this->BelongsTo(Group::class, 'group_id', 'id');
    }

    /**
     * @return BelongsTo
     */
    public function transaction(): BelongsTo
    {
        return $this->BelongsTo(Transaction::class, 'transaction_id', 'id');
    }
}
