Passed
Push — MODEL_LIB_240928 ( 143dd3...d1103d )
by Rafael
57:04 queued 21s
created

Prelevement   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 14
c 2
b 0
f 0
dl 0
loc 21
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A prelevement_ligne() 0 3 1
1
<?php
2
3
/* Copyright (C) 2024       Rafael San José         <[email protected]>
4
 *
5
 * This program is free software; you can redistribute it and/or modify
6
 * it under the terms of the GNU General Public License as published by
7
 * the Free Software Foundation; either version 3 of the License, or
8
 * any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17
 */
18
19
namespace Dolibarr\Code\Compta\Model;
20
21
use Dolibarr\Core\Base\Model;
22
23
/**
24
 * Class Prelevement
25
 *
26
 * @property int $rowid
27
 * @property int|null $fk_facture
28
 * @property int|null $fk_facture_fourn
29
 * @property int|null $fk_salary
30
 * @property int $fk_prelevement_lignes
31
 *
32
 * @property PrelevementLigne $prelevement_ligne
33
 */
34
class Prelevement extends Model
35
{
36
    public $timestamps = false;
37
    protected $table = 'prelevement';
38
    protected $casts = [
39
        'fk_facture' => 'int',
40
        'fk_facture_fourn' => 'int',
41
        'fk_salary' => 'int',
42
        'fk_prelevement_lignes' => 'int'
43
    ];
44
45
    protected $fillable = [
46
        'fk_facture',
47
        'fk_facture_fourn',
48
        'fk_salary',
49
        'fk_prelevement_lignes'
50
    ];
51
52
    public function prelevement_ligne()
53
    {
54
        return $this->belongsTo(PrelevementLigne::class, 'fk_prelevement_lignes');
55
    }
56
}
57