Merge branch '513-resq-add-date_create-to-customer' into '485-resq-september-10-release'
Resolve "Resq - add date_create to Customer" See merge request jankstudio/resq!591
This commit is contained in:
commit
1151852f1d
2 changed files with 12 additions and 0 deletions
2
initial_sql/sql_update_customer_date_create.sql
Normal file
2
initial_sql/sql_update_customer_date_create.sql
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
UPDATE customer SET date_create=NOW() WHERE date_create="0000-00-00 00:00:00";
|
||||||
|
|
||||||
|
|
@ -6,6 +6,8 @@ use Doctrine\ORM\Mapping as ORM;
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
use Symfony\Component\Validator\Constraints as Assert;
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
use DateTime;
|
||||||
|
|
||||||
use App\Ramcar\CustomerClassification;
|
use App\Ramcar\CustomerClassification;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -184,6 +186,12 @@ class Customer
|
||||||
*/
|
*/
|
||||||
protected $flag_dpa_consent;
|
protected $flag_dpa_consent;
|
||||||
|
|
||||||
|
// date customer was created
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="datetime")
|
||||||
|
*/
|
||||||
|
protected $date_create;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->numbers = new ArrayCollection();
|
$this->numbers = new ArrayCollection();
|
||||||
|
|
@ -214,6 +222,8 @@ class Customer
|
||||||
$this->flag_promo_email = false;
|
$this->flag_promo_email = false;
|
||||||
$this->flag_promo_sms = false;
|
$this->flag_promo_sms = false;
|
||||||
$this->flag_dpa_consent = false;
|
$this->flag_dpa_consent = false;
|
||||||
|
|
||||||
|
$this->date_create = new DateTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getID()
|
public function getID()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue