customersEmailList.php
734 Bytes
<?php
class customersEmailList extends \Phalcon\Mvc\Model
{
public $email;
public $name;
public $customers_id;
public $project_id;
public $status;
public $gender;
public $birthday;
public function getSource()
{
return "customers_email";
}
public function checkEventForUser($event_id,$project_id ){
$event_check = \eventInfo::findFirst("customer_id = {$this->id} AND event_id = {$event_id} AND project_id = {$project_id}");
if($event_check instanceof \eventInfo ){
if($event_check->next_delivery && $event_check->next_delivery < date("Y-m-d H:i:s")){
return true;
}
}else{
return true;
}
}
}