<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use App\Models\User;

class Transaction extends Model
{
    use HasFactory;

    protected $table = 'transactions';

    protected $fillable = [
        'trx_id',
        'ref_id',
        'user_id',
        'code_product',
        'product_name',
        'target_id',
        'price',
        'profit',
        'total_price',
        'message',
        'trx_status',
        'sn',
    ];

    public function user()
    {
        return $this->belongsTo(User::class);
    }

}