|
|
|
@@ -1,39 +1,43 @@ |
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Model\Module;
|
|
|
|
|
|
|
|
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
|
|
|
|
|
|
|
|
class ConfidentialFile extends Eloquent
|
|
|
|
{
|
|
|
|
//
|
|
|
|
protected $connection = 'mongodb';
|
|
|
|
protected $collection = 'confidential_file';
|
|
|
|
|
|
|
|
protected $guarded = ['_id'];
|
|
|
|
|
|
|
|
public function staff(){
|
|
|
|
return $this->belongsTo('App\Model\Staff', 'no_badan', 'penguatkuasa');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function compound(){
|
|
|
|
return $this->hasOne('App\Model\Module\Compound');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function memo()
|
|
|
|
{
|
|
|
|
return $this->belongsToMany('App\Model\Module\Memo');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function history(){
|
|
|
|
return $this->belongsToMany('App\Model\Module\History');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function investigation(){
|
|
|
|
return $this->hasMany('App\Model\Module\Investigation');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function iteminventory(){
|
|
|
|
return $this->hasMany('App\Model\Module\ItemInventory');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
<?php |
|
|
|
|
|
|
|
namespace App\Model\Module; |
|
|
|
|
|
|
|
use Jenssegers\Mongodb\Eloquent\Model as Eloquent; |
|
|
|
|
|
|
|
class ConfidentialFile extends Eloquent |
|
|
|
{ |
|
|
|
// |
|
|
|
protected $connection = 'mongodb'; |
|
|
|
protected $collection = 'confidential_file'; |
|
|
|
|
|
|
|
protected $guarded = ['_id']; |
|
|
|
|
|
|
|
public function staff(){ |
|
|
|
return $this->belongsTo('App\Model\Staff', 'no_badan', 'penguatkuasa'); |
|
|
|
} |
|
|
|
|
|
|
|
public function compound(){ |
|
|
|
return $this->hasOne('App\Model\Module\Compound'); |
|
|
|
} |
|
|
|
|
|
|
|
public function notice(){ |
|
|
|
return $this->hasOne('App\Model\Module\Notice'); |
|
|
|
} |
|
|
|
|
|
|
|
public function memo() |
|
|
|
{ |
|
|
|
return $this->belongsToMany('App\Model\Module\Memo'); |
|
|
|
} |
|
|
|
|
|
|
|
public function history(){ |
|
|
|
return $this->belongsToMany('App\Model\Module\History'); |
|
|
|
} |
|
|
|
|
|
|
|
public function investigation(){ |
|
|
|
return $this->hasMany('App\Model\Module\Investigation'); |
|
|
|
} |
|
|
|
|
|
|
|
public function iteminventory(){ |
|
|
|
return $this->hasMany('App\Model\Module\ItemInventory'); |
|
|
|
} |
|
|
|
} |