45 lines
809 B
PHP
45 lines
809 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
|
use Illuminate\Notifications\Notifiable;
|
|
|
|
|
|
class Company extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'nombre',
|
|
'logo',
|
|
'rfc',
|
|
'email',
|
|
'plan',
|
|
'limite_cotizaciones',
|
|
'activo',
|
|
];
|
|
|
|
public function users()
|
|
{
|
|
return $this->hasMany(User::class);
|
|
}
|
|
|
|
public function clientes()
|
|
{
|
|
return $this->hasMany(Cliente::class);
|
|
}
|
|
|
|
public function productos()
|
|
{
|
|
return $this->hasMany(Producto::class);
|
|
}
|
|
|
|
public function cotizaciones()
|
|
{
|
|
return $this->hasMany(Cotizacion::class);
|
|
}
|
|
}
|