Completed
Push — master ( 65052d...e6fef9 )
by Dmitry
03:42
created

Bill::relations()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 0
cts 9
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 0
crap 2
1
<?php
2
3
namespace hiqdev\billing\hiapi\models;
4
5
use hiapi\query\types\IntegerAttribute;
6
use hiapi\query\types\StringAttribute;
7
8
class Bill extends AbstractModel
9
{
10
    public function attributes()
11
    {
12
        return [
13
            'id' => IntegerAttribute::class,
14
            'name' => StringAttribute::class,
15
            'time' => StringAttribute::class, // todo: change to time
16
        ];
17
    }
18
19
    public function relations()
20
    {
21
        return [
22
            'quantity' => Quantity::class,
23
            'sum' => Money::class,
24
            'type' => Type::class,
25
            'customer' => Customer::class,
26
            'target' => Target::class,
27
        ];
28
    }
29
}
30