1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
-
- namespace App\Model\Module;
-
- use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
- use Jenssegers\Mongodb\Eloquent\SoftDeletes;
-
- class Notice extends Eloquent
- {
- //
- use SoftDeletes;
-
- protected $connection = 'mongodb';
- protected $collection = 'notice';
-
- protected $guarded = ['_id'];
-
- public function compound(){
- return $this->hasOne('App\Model\Module\Compound', '_id', '_id');
- }
-
- public function attachment(){
- return $this->hasMany('App\Model\Module\Attachment');
- }
-
- public function staff()
- {
- return $this->belongsTo('App\Model\Staff','no_badan','dikeluarkan');
- }
-
- public function staffdetail()
- {
- return $this->belongsTo('App\Model\StaffDetail','dikeluarkan','_id');
- }
-
- public function confidentialfile()
- {
- return $this->belongsTo('App\Model\Module\ConfidentialFile', 'confidential_file_id', '_id');
- }
-
- public function updateby(){
- return $this->belongsTo('App\Model\StaffDetail','update_by','_id');
- }
-
- public function faulty(){
- return $this->belongsTo('App\Model\Module\Faulty', 'seksyen_kesalahan', '_id');
- }
-
- public function department(){
- return $this->belongsTo('App\Model\Module\Department', 'jbkod', '_id');
- }
-
- public function deedlaw(){
- return $this->belongsTo('App\Model\Module\DeedLaw', 'akta', '_id');
- }
- }
|