zend-blog-3-backend

Форк
0
92 строки · 1.4 Кб
1
<?php
2

3
namespace App\Entity\Embedded;
4

5
use Doctrine\ORM\Mapping as ORM;
6

7
/**
8
 * @ORM\Embeddable()
9
 */
10
class NestedSet
11
{
12
    /**
13
     * @var int
14
     *
15
     * @ORM\Column(type="integer", nullable=true, options={"unsigned": true})
16
     */
17
    private $leftKey;
18

19
    /**
20
     * @var int
21
     *
22
     * @ORM\Column(type="integer", nullable=true, options={"unsigned": true})
23
     */
24
    private $rightKey;
25

26
    /**
27
     * @var int
28
     *
29
     * @ORM\Column(type="integer", options={"unsigned": true, "default": 1})
30
     */
31
    private $depth = 1;
32

33
    /**
34
     * @return int
35
     */
36
    public function getLeftKey(): int
37
    {
38
        return $this->leftKey;
39
    }
40

41
    /**
42
     * @param int $leftKey
43
     *
44
     * @return NestedSet
45
     */
46
    public function setLeftKey(int $leftKey): self
47
    {
48
        $this->leftKey = $leftKey;
49

50
        return $this;
51
    }
52

53
    /**
54
     * @return int
55
     */
56
    public function getRightKey(): int
57
    {
58
        return $this->rightKey;
59
    }
60

61
    /**
62
     * @param int $rightKey
63
     *
64
     * @return NestedSet
65
     */
66
    public function setRightKey(int $rightKey): self
67
    {
68
        $this->rightKey = $rightKey;
69

70
        return $this;
71
    }
72

73
    /**
74
     * @return int
75
     */
76
    public function getDepth(): int
77
    {
78
        return $this->depth;
79
    }
80

81
    /**
82
     * @param int $depth
83
     *
84
     * @return NestedSet
85
     */
86
    public function setDepth(int $depth): self
87
    {
88
        $this->depth = $depth;
89

90
        return $this;
91
    }
92
}
93

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.