Dashboard sipadu mbip
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

Notice.php 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 updateby(){
  27. return $this->belongsTo('App\Model\StaffDetail','update_by','_id');
  28. }
  29. public function faulty(){
  30. return $this->belongsTo('App\Model\Module\Faulty', 'seksyen_kesalahan', '_id');
  31. }
  32. public function department(){
  33. return $this->belongsTo('App\Model\Module\Department', 'jbkod', '_id');
  34. }
  35. public function deedlaw(){
  36. return $this->belongsTo('App\Model\Module\DeedLaw', 'akta', '_id');
  37. }
  38. }