mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
delete is_deleted field
This commit is contained in:
@ -36,7 +36,6 @@ class ClientePlantillaPreciosLineasModel extends \App\Models\BaseModel
|
||||
"tiempo_max",
|
||||
"precio_hora",
|
||||
"margen",
|
||||
"is_deleted",
|
||||
"deleted_at",
|
||||
"created_at",
|
||||
"updated_at",
|
||||
@ -45,11 +44,12 @@ class ClientePlantillaPreciosLineasModel extends \App\Models\BaseModel
|
||||
protected $returnType = "App\Entities\Clientes\ClientePlantillaPreciosLineasEntity";
|
||||
|
||||
protected $useTimestamps = true;
|
||||
protected $useSoftDeletes = false;
|
||||
protected $useSoftDeletes = true;
|
||||
|
||||
protected $createdField = "created_at";
|
||||
|
||||
protected $updatedField = "updated_at";
|
||||
protected $deletedField = 'deleted_at';
|
||||
|
||||
public static $labelField = "plantilla_id";
|
||||
|
||||
@ -121,7 +121,6 @@ class ClientePlantillaPreciosLineasModel extends \App\Models\BaseModel
|
||||
$this->db
|
||||
->table($this->table . " t1")
|
||||
->where('t1.plantilla_id', $plantilla_id)
|
||||
->set('is_deleted', 1)
|
||||
->set('deleted_at', $date_value)
|
||||
->update();
|
||||
|
||||
@ -152,7 +151,7 @@ class ClientePlantillaPreciosLineasModel extends \App\Models\BaseModel
|
||||
|
||||
$builder->join("users t2", "t1.user_updated_id = t2.id", "left");
|
||||
|
||||
$builder->where('t1.is_deleted', 0);
|
||||
$builder->where('t1.deleted_at', 0);
|
||||
$builder->where('t1.plantilla_id', $plantilla_id);
|
||||
|
||||
if (empty($search))
|
||||
@ -181,7 +180,7 @@ class ClientePlantillaPreciosLineasModel extends \App\Models\BaseModel
|
||||
$rows = $this->db
|
||||
->table($this->table)
|
||||
->select("id, tiempo_min, tiempo_max")
|
||||
->where("is_deleted", 0)
|
||||
->where("deleted_at", null)
|
||||
->where("tipo", $data["tipo"])
|
||||
->where("tipo_maquina", $data["tipo_maquina"])
|
||||
->where("tipo_impresion", $data["tipo_impresion"])
|
||||
|
||||
Reference in New Issue
Block a user