<?php
namespace App\Entity\Core;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table('email_signup')]
#[ORM\Entity]
class EmailSignup
{
/**
* @var int
*/
#[ORM\Column(name: 'id', type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private $id;
/**
* @var string
*/
#[ORM\Column(type: 'string', nullable: false)]
private $email;
/**
* @var DateTime
*/
#[ORM\Column(name: 'timestamp', type: 'datetime')]
private $timestamp;
public function __construct(string $email)
{
$this->email =$email;
$this->timestamp = new DateTime('now');
}
}