Total Complexity | 3 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class Product extends DataLayer |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * Product constructor. |
||
18 | */ |
||
19 | public function __construct() |
||
20 | { |
||
21 | parent::__construct( |
||
22 | "products", |
||
23 | ["restaurant_id", "category_id", "name", "price"] |
||
24 | ); |
||
25 | } |
||
26 | |||
27 | public function restaurant(): Product |
||
28 | { |
||
29 | $this->restaurant = (new Restaurant())->findById($this->restaurant_id)->data(); |
||
30 | return $this; |
||
31 | } |
||
32 | |||
33 | public function category(): Product |
||
37 | } |
||
38 | |||
39 | } |