Noticeslog_model.php 776 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. class Noticeslog_model extends CI_Model
  3. {
  4. private $collection_name = 'notices_log';
  5. public function __construct()
  6. {
  7. parent::__construct();
  8. }
  9. private $model = array(
  10. 'log_id' => "",
  11. "type" => "",
  12. "mobile" => "",
  13. "recipient" => "",
  14. "subject" => "",
  15. "content" => "",
  16. "status" => "",
  17. "create_time" => ""
  18. );
  19. public function get_model()
  20. {
  21. return $this->model;
  22. }
  23. public function save_notices_log($notices_log)
  24. {
  25. return $this->mongo_db->insert($this->collection_name, $notices_log);
  26. }
  27. public function delete_notices_log($log_id)
  28. {
  29. return $this->mongo_db->where("log_id", $log_id)->delete($this->collection_name);
  30. }
  31. }