Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
TblApprovalThresholds
n/a
0 / 0
n/a
0 / 0
0
n/a
0 / 0
1<?php
2
3namespace App\Models;
4
5use Illuminate\Database\Eloquent\Factories\HasFactory;
6use Illuminate\Database\Eloquent\Model;
7
8/**
9 * Approval threshold matrix row (SOP v2.0). Editable copy of
10 * `Matriz_umbrales_aprobacion_TITAN.xlsx`. See the create migration for the
11 * meaning/scale of each column. A threshold of 0 or null = dimension disabled.
12 */
13class TblApprovalThresholds extends Model
14{
15    use HasFactory;
16
17    protected $table = 'tbl_approval_thresholds';
18
19    protected $fillable = [
20        'region',
21        'organization_name',
22        'company_id',
23        'project_types_label',
24        'budget_type_ids',
25        'is_catch_all',
26        'customer_types_label',
27        'customer_type_ids',
28        'technical_threshold',
29        'financial_threshold',
30        'min_revenue_per_employee_day',
31        'min_invoice_margin',
32        'min_amount_for_margin_check',
33        'general_costs',
34        'technical_approver_name',
35        'financial_approver_names',
36        'priority',
37        'disabled',
38    ];
39
40    protected $casts = [
41        'company_id' => 'integer',
42        'is_catch_all' => 'boolean',
43        'disabled' => 'boolean',
44        'priority' => 'integer',
45        'technical_threshold' => 'decimal:2',
46        'financial_threshold' => 'decimal:2',
47        'min_revenue_per_employee_day' => 'decimal:2',
48        'min_invoice_margin' => 'decimal:2',
49        'min_amount_for_margin_check' => 'decimal:2',
50        'general_costs' => 'decimal:2',
51    ];
52}