]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Entity/UsersConfig.php
Update UserConfig schema
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Entity / UsersConfig.php
index 0742edbcb986857db569a3f4030f512baa2841b0..52127631a7d1806233fe3bab0a9fd3f259899ebc 100644 (file)
@@ -22,11 +22,9 @@ class UsersConfig
     private $id;
 
     /**
-     * @var string
-     *
-     * @ORM\Column(name="user_id", type="decimal", precision=10, scale=0, nullable=true)
+     * @ORM\ManyToOne(targetEntity="User", inversedBy="config")
      */
-    private $userId;
+    private $user;
 
     /**
      * @var string
@@ -53,71 +51,71 @@ class UsersConfig
     }
 
     /**
-     * Set userId
+     * Set name
      *
-     * @param  string      $userId
+     * @param  string      $name
      * @return UsersConfig
      */
-    public function setUserId($userId)
+    public function setName($name)
     {
-        $this->userId = $userId;
+        $this->name = $name;
 
         return $this;
     }
 
     /**
-     * Get userId
+     * Get name
      *
      * @return string
      */
-    public function getUserId()
+    public function getName()
     {
-        return $this->userId;
+        return $this->name;
     }
 
     /**
-     * Set name
+     * Set value
      *
-     * @param  string      $name
+     * @param  string      $value
      * @return UsersConfig
      */
-    public function setName($name)
+    public function setValue($value)
     {
-        $this->name = $name;
+        $this->value = $value;
 
         return $this;
     }
 
     /**
-     * Get name
+     * Get value
      *
      * @return string
      */
-    public function getName()
+    public function getValue()
     {
-        return $this->name;
+        return $this->value;
     }
 
     /**
-     * Set value
+     * Set user
      *
-     * @param  string      $value
+     * @param  \Wallabag\CoreBundle\Entity\User $user
      * @return UsersConfig
      */
-    public function setValue($value)
+    public function setUser(\Wallabag\CoreBundle\Entity\User $user = null)
     {
-        $this->value = $value;
+        $this->user = $user;
 
         return $this;
     }
 
     /**
-     * Get value
+     * Get user
      *
-     * @return string
+     * @return \Wallabag\CoreBundle\Entity\User
      */
-    public function getValue()
+    public function getUser()
     {
-        return $this->value;
+        return $this->user;
     }
 }