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

Notice.php 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace App\Model\Module;
  3. use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
  4. use Jenssegers\Mongodb\Eloquent\SoftDeletes;
  5. class Notice extends Eloquent
  6. {
  7. //
  8. use SoftDeletes;
  9. protected $connection = 'mongodb';
  10. protected $collection = 'notice';
  11. protected $guarded = ['_id'];
  12. public function compound(){
  13. return $this->hasOne('App\Model\Module\Compound', '_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 confidentialfile()
  27. {
  28. return $this->belongsTo('App\Model\Module\ConfidentialFile', 'confidential_file_id', '_id');
  29. }
  30. public function updateby(){
  31. return $this->belongsTo('App\Model\StaffDetail','update_by','_id');
  32. }
  33. public function faulty(){
  34. return $this->belongsTo('App\Model\Module\Faulty', 'seksyen_kesalahan', '_id');
  35. }
  36. public function department(){
  37. return $this->belongsTo('App\Model\Module\Department', 'jbkod', '_id');
  38. }
  39. public function deedlaw(){
  40. return $this->belongsTo('App\Model\Module\DeedLaw', 'akta', '_id');
  41. }
  42. }