CallRecordsModel.php 907 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. namespace App\Models;
  3. use App\Models\BaseModel;
  4. /**
  5. * @description 通话纪录
  6. * @author system;
  7. * @version 1.0
  8. * @date 2018-11-27 03:15:47
  9. *
  10. */
  11. class CallRecordsModel extends BaseModel
  12. {
  13. /**
  14. * 数据表名
  15. *
  16. * @var string
  17. *
  18. */
  19. protected $table = 'call_records';
  20. /**
  21. * 主键
  22. */
  23. protected $primaryKey = 'id';
  24. //分页
  25. protected $perPage = PAGE_NUMS;
  26. /**
  27. * 可以被集体附值的表的字段
  28. *
  29. * @var string
  30. */
  31. protected $fillable = [
  32. 'phone',
  33. 'start_time',
  34. 'end_time',
  35. 'record_path',
  36. 'hangup_dispostion',
  37. 'ip',
  38. 'term_status',
  39. 'intention',
  40. 'cdr_id',
  41. 'call_id'
  42. ];
  43. public function process()
  44. {
  45. return CallRecordsProcessModel::where('call_id', $this->call_id)->where('ip', $this->ip)->get();
  46. }
  47. }