mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
añadido plantilla id
This commit is contained in:
105
ci4/app/Models/Clientes/ClientePreciosModel.php
Normal file
105
ci4/app/Models/Clientes/ClientePreciosModel.php
Normal file
@ -0,0 +1,105 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Clientes;
|
||||
|
||||
class ClientePlantillaPreciosLineasModel extends \App\Models\GoBaseModel
|
||||
{
|
||||
protected $table = "cliente_precios";
|
||||
|
||||
/**
|
||||
* Whether primary key uses auto increment.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $useAutoIncrement = true;
|
||||
|
||||
|
||||
protected $allowedFields = [
|
||||
"cliente_id",
|
||||
"plantilla_id"
|
||||
"tipo",
|
||||
"tipo_maquina",
|
||||
"tipo_impresion",
|
||||
"tiempo_min",
|
||||
"tiempo_max",
|
||||
"precio_hora",
|
||||
"margen",
|
||||
"is_deleted",
|
||||
"deleted_at",
|
||||
"created_at",
|
||||
"updated_at",
|
||||
"user_created_id",
|
||||
"user_updated_id"];
|
||||
|
||||
protected $returnType = "App\Entities\Clientes\ClientePreciosEntity";
|
||||
|
||||
protected $useTimestamps = true;
|
||||
protected $useSoftDeletes = false;
|
||||
|
||||
protected $createdField = "created_at";
|
||||
|
||||
protected $updatedField = "updated_at";
|
||||
|
||||
public static $labelField = "cliente_id";
|
||||
|
||||
protected $validationRules = [
|
||||
"cliente_id" => [
|
||||
"label" => "ClientePrecios.cliente_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 = [
|
||||
"cliente_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",
|
||||
],
|
||||
];
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user