Merge branch 'main' into 'dev/plantillas_clientes'

# Conflicts:
#   ci4/app/Entities/Clientes/ClientePreciosEntity.php
#   ci4/app/Models/Clientes/ClientePreciosModel.php
This commit is contained in:
2023-12-30 09:38:09 +00:00
16 changed files with 384 additions and 17 deletions

View File

@ -0,0 +1,102 @@
<?php
namespace App\Models\Clientes;
class ClientePlantillaPreciosLineasModel extends \App\Models\GoBaseModel
{
protected $table = "cliente_plantilla_precios_linea";
/**
* Whether primary key uses auto increment.
*
* @var bool
*/
protected $useAutoIncrement = true;
protected $allowedFields = [
"plantilla_id",
"tipo",
"tipo_maquina",
"tipo_impresion",
"tiempo_min",
"tiempo_max",
"precio_hora",
"margen",
"is_deleted",
"deleted_at",
"created_at",
"updated_at"];
protected $returnType = "App\Entities\Clientes\ClientePlantillaPreciosLineasEntity";
protected $useTimestamps = true;
protected $useSoftDeletes = false;
protected $createdField = "created_at";
protected $updatedField = "updated_at";
public static $labelField = "plantilla_id";
protected $validationRules = [
"plantilla_id" => [
"label" => "ClientePrecios.plantilla_id",
"rules" => "required",
],
"tipo" => [
"label" => "ClientePrecios.tipo",
"rules" => "required|in_list[interior,cubierta,sobrecubierta]",
],
"tipo_maquina" => [
"label" => "ClientePrecios.tipo_maquina",
"rules" => "required|in_list[toner,inkjet]",
],
"tipo_impresion" => [
"label" => "ClientePrecios.tipo_impresion",
"rules" => "required|in_list[negro,color,negrohq,colorhq]",
],
"tiempo_min" => [
"label" => "ClientePrecios.tiempo_min",
"rules" => "required|decimal",
],
"tiempo_max" => [
"label" => "ClientePrecios.tiempo_max",
"rules" => "required|decimal",
],
"margen" => [
"label" => "ClientePrecios.margen",
"rules" => "required|decimal",
],
];
protected $validationMessages = [
"plantilla_id" => [
"required" => "ClientePrecios.validation.required",
],
"tipo" => [
"required" => "ClientePrecios.validation.required",
],
"tipo_maquina" => [
"required" => "ClientePrecios.validation.required",
],
"tipo_impresion" => [
"required" => "ClientePrecios.validation.required",
],
"tiempo_min" => [
"required" => "ClientePrecios.validation.required",
],
"tiempo_max" => [
"required" => "ClientePrecios.validation.required",
],
"margen" => [
"required" => "ClientePrecios.validation.required",
],
];
}

View File

@ -0,0 +1,44 @@
<?php
namespace App\Models\Clientes;
class ClientePlantillaPreciosModel extends \App\Models\GoBaseModel
{
protected $table = "cliente_plantilla_precios";
/**
* Whether primary key uses auto increment.
*
* @var bool
*/
protected $useAutoIncrement = true;
protected $allowedFields = ["nombre", "is_deleted", "deleted_at", "created_at", "updated_at"];
protected $returnType = "App\Entities\Clientes\ClientePlantillaPreciosEntity";
protected $useTimestamps = true;
protected $useSoftDeletes = false;
protected $createdField = "created_at";
protected $updatedField = "updated_at";
public static $labelField = "nombre";
protected $validationRules = [
"nombre" => [
"label" => "ClientePrecios.nombre",
"rules" => "trim|max_length[100]",
],
];
protected $validationMessages = [
"nombre" => [
"max_length" => "ClientePrecios.validation.max_length",
],
];
}