Dashboard sipadu mbip
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

Compound.php 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. namespace App\Model\Module;
  3. use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
  4. use Jenssegers\Mongodb\Eloquent\SoftDeletes;
  5. class Compound extends Eloquent
  6. {
  7. //
  8. use SoftDeletes;
  9. protected $connection = 'mongodb';
  10. protected $collection = 'compound';
  11. protected $guarded = ['_id'];
  12. public function attachment(){
  13. return $this->hasMany('App\Model\Module\Attachment');
  14. }
  15. public function staff()
  16. {
  17. return $this->belongsTo('App\Model\Staff','no_badan','dikeluarkan');
  18. }
  19. public function staffdetail()
  20. {
  21. return $this->belongsTo('App\Model\StaffDetail','dikeluarkan','_id');
  22. }
  23. public function updateby(){
  24. return $this->belongsTo('App\Model\StaffDetail','update_by','_id');
  25. }
  26. public function confidentialfile()
  27. {
  28. return $this->belongsTo('App\Model\Module\ConfidentialFile', 'confidential_file_id', '_id');
  29. }
  30. public function compoundinvestigation(){
  31. return $this->hasOne('App\Model\Module\CompoundInvestigation');
  32. }
  33. public function letternotice(){
  34. return $this->hasMany('App\Model\Module\LetterNotice');
  35. }
  36. public function faulty(){
  37. return $this->belongsTo('App\Model\Module\Faulty', 'seksyen_kesalahan', '_id');
  38. }
  39. public function department(){
  40. return $this->belongsTo('App\Model\Module\Department', 'jbkod', '_id');
  41. }
  42. public function deedlaw(){
  43. return $this->belongsTo('App\Model\Module\DeedLaw', 'akta', '_id');
  44. }
  45. }