<?php

namespace App\Models;

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

class GroupTransaction extends Model
{
    protected $table = 'group_transactions';
    use SoftDeletes;
    
    /**
     * @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');
    }
}
