Dashboard sipadu mbip
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 notice(){
  13. return $this->belongsTo('App\Model\Module\Notice', '_id', '_id');
  14. }
  15. public function attachment(){
  16. return $this->hasMany('App\Model\Module\Attachment');
  17. }
  18. public function staff()
  19. {
  20. return $this->belongsTo('App\Model\Staff','no_badan','dikeluarkan');
  21. }
  22. public function staffdetail()
  23. {
  24. return $this->belongsTo('App\Model\StaffDetail','dikeluarkan','_id');
  25. }
  26. public function staffdetailNotis()
  27. {
  28. return $this->belongsTo('App\Model\StaffDetail','dikeluarkan_n','_id');
  29. }
  30. public function updateby()
  31. {
  32. return $this->belongsTo('App\Model\StaffDetail','update_by','_id');
  33. }
  34. public function confidentialfile()
  35. {
  36. return $this->belongsTo('App\Model\Module\ConfidentialFile', 'confidential_file_id', '_id');
  37. }
  38. public function compoundinvestigation(){
  39. return $this->hasOne('App\Model\Module\CompoundInvestigation');
  40. }
  41. public function letternotice(){
  42. return $this->hasMany('App\Model\Module\LetterNotice');
  43. }
  44. public function department(){
  45. return $this->belongsTo('App\Model\Module\Department', 'jbkod', '_id');
  46. }
  47. public function departmentNotis(){
  48. return $this->belongsTo('App\Model\Module\Department', 'jbkod_n', '_id');
  49. }
  50. public function deedlaw(){
  51. return $this->belongsTo('App\Model\Module\DeedLaw', 'akta', '_id');
  52. }
  53. public function deedlawNotis(){
  54. return $this->belongsTo('App\Model\Module\DeedLaw', 'akta_n', '_id');
  55. }
  56. public function faulty(){
  57. return $this->belongsTo('App\Model\Module\Faulty', 'seksyen_kesalahan', '_id');
  58. }
  59. public function faultyNotis(){
  60. return $this->belongsTo('App\Model\Module\Faulty', 'seksyen_kesalahan_n', '_id');
  61. }
  62. }