<?php

namespace App\Models\atmodels;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Airtime_Contacts_Group_Association extends Model
{
    protected $connection = 'mysql_temp';
    protected $table = 'airtime_contacts_group_association';
    public $primaryKey = 'contacts_group_association_id';
    public $timestamps = false;
    protected  $fillable = [
        'contacts_group_association_id',
        'group_id',
        'contact_id',
    ];
    //rlshp
    // contact group
    public function assogroupContacts()
    {
        return $this->hasMany(\App\Models\atmodels\Airtime_contact::class, 'contact_id','contact_id');
    }


            // contact group
    public function groupContacts()
    {
        return $this->belongsTo(\App\Models\atmodels\Airtime_group::class, 'group_id','group_id');
    }
}
