2026-05-13 11:20:33 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
|
|
class Company extends Model
|
|
|
|
|
{
|
|
|
|
|
use HasFactory;
|
|
|
|
|
|
|
|
|
|
protected $fillable = [
|
2026-05-27 01:33:27 +02:00
|
|
|
'apodo',
|
|
|
|
|
'estado',
|
|
|
|
|
'logo_path',
|
2026-05-13 11:20:33 +02:00
|
|
|
'name',
|
|
|
|
|
'tax_id',
|
|
|
|
|
'address',
|
|
|
|
|
'phone',
|
|
|
|
|
'email',
|
|
|
|
|
'website',
|
|
|
|
|
'type',
|
|
|
|
|
'notes',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
protected $dates = ['deleted_at'];
|
|
|
|
|
|
|
|
|
|
// Relationships
|
|
|
|
|
public function projects()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsToMany(Project::class, 'company_project')
|
|
|
|
|
->withPivot('role_in_project')
|
|
|
|
|
->withTimestamps();
|
|
|
|
|
}
|
|
|
|
|
}
|