123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?php
-
- namespace App\Model\Module;
-
- use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
- use Jenssegers\Mongodb\Eloquent\SoftDeletes;
-
- class Compound extends Eloquent
- {
- //
- use SoftDeletes;
-
- protected $connection = 'mongodb';
- protected $collection = 'compound';
-
- protected $guarded = ['_id'];
-
- public function notice(){
- return $this->belongsTo('App\Model\Module\Notice', '_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 staffdetailNotis()
- {
- return $this->belongsTo('App\Model\StaffDetail','dikeluarkan_n','_id');
- }
-
- public function updateby()
- {
- return $this->belongsTo('App\Model\StaffDetail','update_by','_id');
- }
-
- public function confidentialfile()
- {
- return $this->belongsTo('App\Model\Module\ConfidentialFile', 'confidential_file_id', '_id');
- }
-
- public function compoundinvestigation(){
- return $this->hasOne('App\Model\Module\CompoundInvestigation');
- }
-
- public function letternotice(){
- return $this->hasMany('App\Model\Module\LetterNotice');
- }
-
- public function department(){
- return $this->belongsTo('App\Model\Module\Department', 'jbkod', '_id');
- }
-
- public function deedlaw(){
- return $this->belongsTo('App\Model\Module\DeedLaw', 'akta', '_id');
- }
-
- public function deedlawNotis(){
- return $this->belongsTo('App\Model\Module\DeedLaw', 'akta_n', '_id');
- }
-
- public function faulty(){
- return $this->belongsTo('App\Model\Module\Faulty', 'seksyen_kesalahan', '_id');
- }
-
- public function faultyNotis(){
- return $this->belongsTo('App\Model\Module\Faulty', 'seksyen_kesalahan_n', '_id');
- }
- }
|