<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\HasOne;

class AdresComp extends Model
{
    use HasFactory;

    //link to table
    protected $table = "ADRES_COMP";

    //link to PK
    protected $primaryKey= 'RID';


    /*public function address(): HasMany
    {
        return $this->hasMany(Address::class, 'distr', 'rid');
    }*/

    public function addressComp(): HasMany
    {
        return $this->hasMany(Address::class, 'distr', 'rid');
    }
    /**
     * Get the

    public function districtMapping(): HasOne
    {
        return $this->hasOne(DistrictMapping::class);
    }
*/

    /*public function districtMapping(): HasMany
    {
        return $this->hasMany(DistrictMapping::class, '', '');
    }*/
}
