X-Git-Url: https://git.rapsys.eu/userbundle/blobdiff_plain/09388c0e8247c60b1f01360944d9ad416810b77b..5c4a473f4d617940aedd24d9ef0154ad85cd1938:/Entity/Group.php diff --git a/Entity/Group.php b/Entity/Group.php index d155002..670e5b7 100644 --- a/Entity/Group.php +++ b/Entity/Group.php @@ -22,22 +22,22 @@ use Rapsys\UserBundle\Entity\User; */ class Group { /** - * @var integer + * Primary key */ - protected int $id; + protected ?int $id = null; /** - * @var \DateTime + * Create datetime */ protected \DateTime $created; /** - * @var \DateTime + * Update datetime */ protected \DateTime $updated; /** - * @var ArrayCollection + * Users collection */ protected Collection $users; @@ -50,6 +50,8 @@ class Group { //Set defaults $this->created = new \DateTime('now'); $this->updated = new \DateTime('now'); + + //Set collections $this->users = new ArrayCollection(); } @@ -58,7 +60,7 @@ class Group { * * @return integer */ - public function getId(): int { + public function getId(): ?int { return $this->id; }