Initial commit: Horux Strategy Platform
- Laravel 11 backend with API REST - React 18 + TypeScript + Vite frontend - Multi-parser architecture for accounting systems (CONTPAQi, Aspel, SAP) - 27+ financial metrics calculation - PDF report generation with Browsershot - Complete documentation (10 documents) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
58
backend/app/Models/Cliente.php
Normal file
58
backend/app/Models/Cliente.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class Cliente extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'nombre_empresa',
|
||||
'logo',
|
||||
'giro_id',
|
||||
'moneda',
|
||||
'configuracion',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'configuracion' => 'array',
|
||||
];
|
||||
}
|
||||
|
||||
public function giro(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Giro::class);
|
||||
}
|
||||
|
||||
public function usuarios(): HasMany
|
||||
{
|
||||
return $this->hasMany(User::class);
|
||||
}
|
||||
|
||||
public function balanzas(): HasMany
|
||||
{
|
||||
return $this->hasMany(Balanza::class);
|
||||
}
|
||||
|
||||
public function reportes(): HasMany
|
||||
{
|
||||
return $this->hasMany(Reporte::class);
|
||||
}
|
||||
|
||||
public function mapeoCuentas(): HasMany
|
||||
{
|
||||
return $this->hasMany(MapeoCuenta::class);
|
||||
}
|
||||
|
||||
public function permisosEmpleado(): HasMany
|
||||
{
|
||||
return $this->hasMany(PermisoEmpleado::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user