*/
class Civility {
/**
- * @var integer
+ * Primary key
*/
- protected int $id;
+ protected ?int $id = null;
/**
- * @var \DateTime
+ * Creation datetime
*/
protected \DateTime $created;
/**
- * @var \DateTime
+ * Update datetime
*/
protected \DateTime $updated;
/**
- * @var ArrayCollection
+ * Users collection
*/
protected Collection $users;
//Set defaults
$this->created = new \DateTime('now');
$this->updated = new \DateTime('now');
+
+ //Set collections
$this->users = new ArrayCollection();
}
*
* @return integer
*/
- public function getId(): int {
+ public function getId(): ?int {
return $this->id;
}
*/
class Group {
/**
- * @var integer
+ * Primary key
*/
- protected int $id;
+ protected ?int $id = null;
/**
- * @var \DateTime
+ * Creation datetime
*/
protected \DateTime $created;
/**
- * @var \DateTime
+ * Update datetime
*/
protected \DateTime $updated;
/**
- * @var ArrayCollection
+ * Users collection
*/
protected Collection $users;
//Set defaults
$this->created = new \DateTime('now');
$this->updated = new \DateTime('now');
+
+ //Set collections
$this->users = new ArrayCollection();
}
*
* @return integer
*/
- public function getId(): int {
+ public function getId(): ?int {
return $this->id;
}
*/
class User implements UserInterface, PasswordAuthenticatedUserInterface {
/**
- * @var ?integer
+ * Primary key
*/
- protected ?int $id;
+ protected ?int $id = null;
/**
- * @var \DateTime
+ * Creation datetime
*/
protected \DateTime $created;
/**
- * @var \DateTime
+ * Update datetime
*/
protected \DateTime $updated;
/**
- * @var Doctrine\Common\Collections\Collection
+ * Groups collection
*/
protected Collection $groups;