mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/unity.git
synced 2026-08-23 06:14:05 +00:00
hide id
This commit is contained in:
@@ -13,12 +13,20 @@ class ContractTemplateObligationDependency extends Model
|
||||
|
||||
protected $appends = [
|
||||
'hash_id',
|
||||
'user_hash_id',
|
||||
'contract_template_obligation_hash_id',
|
||||
'depend_contract_template_obligation_hash_id',
|
||||
'contract_template_obligation_list',
|
||||
'depend_contract_template_obligation_list'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'id',
|
||||
'user_id',
|
||||
'contract_template_obligation_id',
|
||||
'depend_contract_template_obligation_id'
|
||||
];
|
||||
|
||||
public function contract_template_obligation()
|
||||
{
|
||||
return $this->belongsTo('App\Models\ContractTemplateObligation', 'contract_template_obligation_id');
|
||||
@@ -34,6 +42,11 @@ class ContractTemplateObligationDependency extends Model
|
||||
return Hasher::encode('contract_template_obligation_dependencies', $this->id);
|
||||
}
|
||||
|
||||
public function getUserHashIdAttribute()
|
||||
{
|
||||
return Hasher::encode('users', $this->user_id);
|
||||
}
|
||||
|
||||
public function getContractTemplateObligationHashIdAttribute()
|
||||
{
|
||||
return Hasher::encode('contract_template_obligations', $this->contract_template_obligation_id);
|
||||
|
||||
Reference in New Issue
Block a user