BrowseRecord.php 704 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace App\Models;
  3. class BrowseRecord extends SoftBaseModel
  4. {
  5. /**栏目 1:测评
  6. * @var integer
  7. */
  8. const COLUMN_1 = 1;
  9. /**栏目 2:训练
  10. * @var integer
  11. */
  12. const COLUMN_2 = 2;
  13. /**栏目 3:专家来了(科普)
  14. * @var integer
  15. */
  16. const COLUMN_3 = 3;
  17. /**栏目 4:播放课程
  18. * @var integer
  19. */
  20. const COLUMN_4 = 4;
  21. public function scale(){
  22. return $this->belongsTo(Scale::class, 'object_id');
  23. }
  24. public function drill(){
  25. return $this->belongsTo(MentalityDrill::class, 'object_id');
  26. }
  27. public function specialist(){
  28. return $this->belongsTo(SpecialistInfo::class, 'object_id');
  29. }
  30. }