mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
56 lines
1.3 KiB
PHP
56 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Models\Pedidos;
|
|
|
|
class PedidoModel extends \App\Models\BaseModel
|
|
{
|
|
protected $table = "pedidos";
|
|
|
|
/**
|
|
* Whether primary key uses auto increment.
|
|
*
|
|
* @var bool
|
|
*/
|
|
protected $useAutoIncrement = true;
|
|
|
|
const SORTABLE_TODOS = [
|
|
0 => "t1.id",
|
|
1 => "t1.updated_at",
|
|
2 => "t1.fecha_entrega_real",
|
|
3 => "t4.nombre",
|
|
4 => "t5.first_name",
|
|
5 => "t3.titulo",
|
|
6 => "t6.ubicacion",
|
|
7 => "t3.inc_rei",
|
|
8 => "t3.paginas",
|
|
9 => "t3.tirada",
|
|
10 => "t3.total_aceptado",
|
|
11 => "t1.estado"
|
|
];
|
|
|
|
protected $allowedFields = [
|
|
"total_precio",
|
|
"total_tirada",
|
|
"estado",
|
|
"user_created_id",
|
|
"user_updated_id",
|
|
"user_validated_id",
|
|
"fecha_entrega_real",
|
|
"fecha_impresion",
|
|
"fecha_encuadernado",
|
|
"fecha_entrega_externo",
|
|
"created_at",
|
|
"updated_at",
|
|
"validated_at",
|
|
];
|
|
protected $returnType = "App\Entities\Pedidos\PedidoEntity";
|
|
|
|
protected $useTimestamps = true;
|
|
protected $useSoftDeletes = false;
|
|
|
|
protected $createdField = "created_at";
|
|
protected $updatedField = "updated_at";
|
|
|
|
public static $labelField = "id";
|
|
|
|
} |