diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity/Entry.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Entity/Entry.php | 41 |
1 files changed, 16 insertions, 25 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index a00762ca..937213b4 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php | |||
@@ -84,13 +84,6 @@ class Entry | |||
84 | /** | 84 | /** |
85 | * @var string | 85 | * @var string |
86 | * | 86 | * |
87 | * @ORM\Column(name="user_id", type="decimal", precision=10, scale=0, nullable=true) | ||
88 | */ | ||
89 | private $userId; | ||
90 | |||
91 | /** | ||
92 | * @var string | ||
93 | * | ||
94 | * @ORM\Column(name="comments", type="text", nullable=true) | 87 | * @ORM\Column(name="comments", type="text", nullable=true) |
95 | */ | 88 | */ |
96 | private $comments; | 89 | private $comments; |
@@ -124,6 +117,19 @@ class Entry | |||
124 | private $isPublic; | 117 | private $isPublic; |
125 | 118 | ||
126 | /** | 119 | /** |
120 | * @ORM\ManyToOne(targetEntity="User", inversedBy="entries") | ||
121 | */ | ||
122 | private $user; | ||
123 | |||
124 | /* | ||
125 | * @param User $user | ||
126 | */ | ||
127 | public function __construct(User $user) | ||
128 | { | ||
129 | $this->user = $user; | ||
130 | } | ||
131 | |||
132 | /** | ||
127 | * Get id | 133 | * Get id |
128 | * | 134 | * |
129 | * @return integer | 135 | * @return integer |
@@ -263,26 +269,11 @@ class Entry | |||
263 | } | 269 | } |
264 | 270 | ||
265 | /** | 271 | /** |
266 | * Set userId | 272 | * @return User |
267 | * | ||
268 | * @param string $userId | ||
269 | * @return Entry | ||
270 | */ | ||
271 | public function setUserId($userId) | ||
272 | { | ||
273 | $this->userId = $userId; | ||
274 | |||
275 | return $this; | ||
276 | } | ||
277 | |||
278 | /** | ||
279 | * Get userId | ||
280 | * | ||
281 | * @return string | ||
282 | */ | 273 | */ |
283 | public function getUserId() | 274 | public function getUser() |
284 | { | 275 | { |
285 | return $this->userId; | 276 | return $this->user; |
286 | } | 277 | } |
287 | 278 | ||
288 | /** | 279 | /** |