05-send_log.php 574 B

12345678910111213141516171819202122
  1. <?php
  2. namespace cx_newsletter;
  3. class send_log
  4. extends database_item
  5. implements database_item_interface {
  6. public ?campaign $campaign = null;
  7. public ?customer $customer = null;
  8. public ?\datetime $sended = null;
  9. public function is_complete() : bool {
  10. if ($this->campaign === null) return false;
  11. if ($this->customer === null) return false;
  12. if ($this->sended === null) return false;
  13. if (!$this->campaign->is_complete()) return false;
  14. if (!$this->customer->is_complete()) return false;
  15. return true;
  16. }
  17. }