<?php

namespace App\Models;

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

class Company extends Model
{

    use SoftDeletes;

    protected $table = 'companies';
    protected $primaryKey = 'company_id';
    protected $fillable = ['name', 'nit', 'email', 'phone', 'logo', 'agentName', 'agentPhone'];

    public function offices()
    {
        return $this->hasMany(Office::class, 'company_id', 'company_id');
    }
}
