<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class FinAccount extends Model
{
    protected $table = 'fin_account';
    public $timestamps = false;
    protected $fillable = [

        'user_id',
        'inv_id',
        'credit',
        'debit',
        'investment',
        'type',
        'level',
        'remark',
        'description',
        'percentage',
        'entry_date',
        'generate_date',
    ];

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

    public function roiUser()
    {
        return $this->belongsTo(FinRoiUser::class, 'description', 'roi_id');
    }
}
