3 namespace Wallabag\CoreBundle\Entity
;
5 use Doctrine\ORM\Mapping
as ORM
;
6 use Symfony\Component\Validator\Constraints
as Assert
;
7 use Wallabag\CoreBundle\Helper\EntityTimestampsTrait
;
8 use Wallabag\UserBundle\Entity\User
;
13 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\SiteCredentialRepository")
14 * @ORM\Table(name="`site_credential`")
15 * @ORM\HasLifecycleCallbacks()
19 use EntityTimestampsTrait
;
24 * @ORM\Column(name="id", type="integer")
26 * @ORM\GeneratedValue(strategy="AUTO")
34 * @Assert\Length(max=255)
35 * @ORM\Column(name="host", type="string", length=255)
43 * @ORM\Column(name="username", type="text")
51 * @ORM\Column(name="password", type="text")
58 * @ORM\Column(name="createdAt", type="datetime")
63 * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="siteCredentials")
70 public function __construct(User
$user)
80 public function getId()
90 * @return SiteCredential
92 public function setHost($host)
104 public function getHost()
112 * @param string $username
114 * @return SiteCredential
116 public function setUsername($username)
118 $this->username
= $username;
128 public function getUsername()
130 return $this->username
;
136 * @param string $password
138 * @return SiteCredential
140 public function setPassword($password)
142 $this->password
= $password;
152 public function getPassword()
154 return $this->password
;
160 * @param \DateTime $createdAt
162 * @return SiteCredential
164 public function setCreatedAt($createdAt)
166 $this->createdAt
= $createdAt;
176 public function getCreatedAt()
178 return $this->createdAt
;
184 public function getUser()