*/
class Civility {
/**
- * @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;
//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;
}