<?php

namespace App\Models\fcmodels;

use Illuminate\Database\Eloquent\Model;

class Import extends Model
{
    protected $connection = 'mysql_newfc';
    protected $primaryKey = 'import_id';
    protected $table = 'imports';
  
    protected $fillable = [
        'import_id',
        'import_name',
        'phone',
        'message',
        'status',
        'organization_id'
      
    ];    
    //
    //Import<>Org relationship
    public function ImportOrg()
    {

//first is foreign key in this table second key primary keny of refered table

        return $this->belongsTo(Organization::class,'organization_id','organization_id');
    }
  //rlshp
    public function rateCountry()
    {
        return $this->belongsTo(Country::class,'country_id','id');
    }
}


