for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Uxmp\Core\Orm\Model;
/**
* @Entity(repositoryClass="\Uxmp\Core\Orm\Repository\FavoriteRepository")
* @Table(name="favorite")
*/
class Favorite implements FavoriteInterface
{
* @Id
* @Column(type="integer")
* @GeneratedValue
private int $id;
$id
private int $user_id;
$user_id
private int $item_id;
* @Column(type="string")
private string $type;
* @Column(type="datetime")
private \DateTimeInterface $date;
* @ManyToOne(targetEntity="User")
* @JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
private UserInterface $user;
public function setUser(UserInterface $user): FavoriteInterface
$this->user = $user;
return $this;
}
public function getUser(): UserInterface
return $this->user;
public function setItemId(int $itemId): FavoriteInterface
$this->item_id = $itemId;
public function getItemId(): int
return $this->item_id;
public function setType(string $type): FavoriteInterface
$this->type = $type;
public function getType(): string
return $this->type;
public function setDate(\DateTimeInterface $date): FavoriteInterface
$this->date = $date;
public function getDate(): \DateTimeInterface
return $this->date;