Completed
Pull Request — master (#424)
by Jonas
03:35
created

RemoteToLocalCategory::setId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 1
b 0
f 0
1
<?php
2
/**
3
 * (c) shopware AG <[email protected]>
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 */
7
8
namespace Shopware\CustomModels\Connect;
9
10
use Doctrine\ORM\Mapping as ORM;
11
use Shopware\Components\Model\ModelEntity;
12
use Shopware\Models\Category\Category;
13
14
/**
15
 * Describes Shopware Connect categories to Local Categories
16
 *
17
 * @ORM\Table(name="s_plugin_connect_categories_to_local_categories")
18
 * @ORM\Entity()
19
 */
20
class RemoteToLocalCategory extends ModelEntity
21
{
22
    /**
23
     * @var int
24
     * @ORM\Id
25
     * @ORM\GeneratedValue(strategy="IDENTITY")
26
     * @ORM\Column(name="id", type="integer", nullable=false)
27
     */
28
    protected $id;
29
30
    /**
31
     * @var int
32
     *
33
     * @ORM\Column(name="remote_category_id", type="integer", nullable=false)
34
     */
35
    protected $remoteCategoryId;
36
37
    /**
38
     * @var \Shopware\CustomModels\Connect\RemoteCategory
39
     *
40
     * @ORM\ManyToOne(targetEntity="Shopware\CustomModels\Connect\RemoteCategory", inversedBy="remoteToLocalCategories")
41
     * @ORM\JoinColumns({
42
     *   @ORM\JoinColumn(name="remote_category_id", referencedColumnName="id")
43
     * })
44
     */
45
    protected $remoteCategory;
46
47
    /**
48
     * @var int
49
     *
50
     * @ORM\Column(name="local_category_id", type="integer", nullable=false)
51
     */
52
    protected $localCategoryId;
53
54
    /**
55
     * @var \Shopware\Models\Category\Category
56
     *
57
     * @ORM\OneToOne(targetEntity="Shopware\Models\Category\Category")
58
     * @ORM\JoinColumns({
59
     *   @ORM\JoinColumn(name="local_category_id", referencedColumnName="id")
60
     * })
61
     */
62
    protected $localCategory;
63
64
    /**
65
     * @var string
66
     *
67
     * @ORM\Column(name="stream", type="string", length=255, nullable = true)
68
     */
69
    protected $stream;
70
71
    /**
72
     * @return int
73
     */
74
    public function getId()
75
    {
76
        return $this->id;
77
    }
78
79
    /**
80
     * @param int $id
81
     */
82
    public function setId($id)
83
    {
84
        $this->id = $id;
85
    }
86
87
    /**
88
     * @return RemoteCategory
89
     */
90
    public function getRemoteCategory()
91
    {
92
        return $this->remoteCategory;
93
    }
94
95
    /**
96
     * @param RemoteCategory $remoteCategory
97
     */
98
    public function setRemoteCategory($remoteCategory)
99
    {
100
        $this->remoteCategory = $remoteCategory;
101
    }
102
103
    /**
104
     * @return Category
105
     */
106
    public function getLocalCategory()
107
    {
108
        return $this->localCategory;
109
    }
110
111
    /**
112
     * @param Category $localCategory
113
     */
114
    public function setLocalCategory($localCategory)
115
    {
116
        $this->localCategory = $localCategory;
117
    }
118
119
    /**
120
     * @return string
121
     */
122
    public function getStream()
123
    {
124
        return $this->stream;
125
    }
126
127
    /**
128
     * @param string $stream
129
     */
130
    public function setStream($stream)
131
    {
132
        $this->stream = $stream;
133
    }
134
}
135