Blame view

src/lib/models/customersEmailList.php 734 Bytes
ef60cd4d   Administrator   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  <?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;
          }
  
      }
  
  }