mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/unity.git
synced 2026-08-21 13:24:17 +00:00
hide id
This commit is contained in:
@@ -13,12 +13,21 @@ class ContractObligationContractDependency extends Model
|
||||
|
||||
protected $appends = [
|
||||
'hash_id',
|
||||
'user_hash_id',
|
||||
'contract_obligation_hash_id',
|
||||
'depend_contract_hash_id',
|
||||
'contract_obligation_list',
|
||||
'depend_contract_list'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'id',
|
||||
'user_id',
|
||||
'contract_id',
|
||||
'contract_obligation_id',
|
||||
'depend_contract_id',
|
||||
];
|
||||
|
||||
public function contract_obligation()
|
||||
{
|
||||
return $this->belongsTo('App\Models\ContractObligation', 'contract_obligation_id');
|
||||
@@ -34,6 +43,11 @@ class ContractObligationContractDependency extends Model
|
||||
return Hasher::encode('contract_obligation_contract_dependencies', $this->id);
|
||||
}
|
||||
|
||||
public function getUserHashIdAttribute()
|
||||
{
|
||||
return Hasher::encode('users', $this->user_id);
|
||||
}
|
||||
|
||||
public function getContractObligationHashIdAttribute()
|
||||
{
|
||||
return Hasher::encode('contract_obligations', $this->contract_obligation_id);
|
||||
|
||||
Reference in New Issue
Block a user