mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/unity.git
synced 2026-08-19 12:24:01 +00:00
hide id
This commit is contained in:
@@ -13,7 +13,9 @@ class ContractObligation extends Model
|
||||
|
||||
protected $appends = [
|
||||
'hash_id',
|
||||
'user_hash_id',
|
||||
'contract_hash_id',
|
||||
'contract_template_obligation_hash_id',
|
||||
'contract_list',
|
||||
'contract_obligation_dependency_list',
|
||||
'depend_contract_obligation_dependency_list',
|
||||
@@ -22,6 +24,11 @@ class ContractObligation extends Model
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'id',
|
||||
'user_id',
|
||||
'contract_id',
|
||||
'contract_template_obligation_id',
|
||||
'contract_entity_id',
|
||||
'in_time_contract_obligation_template',
|
||||
];
|
||||
|
||||
@@ -55,11 +62,26 @@ class ContractObligation extends Model
|
||||
return Hasher::encode('contract_obligations', $this->id);
|
||||
}
|
||||
|
||||
public function getUserHashIdAttribute()
|
||||
{
|
||||
return Hasher::encode('users', $this->user_id);
|
||||
}
|
||||
|
||||
public function getContractHashIdAttribute()
|
||||
{
|
||||
return Hasher::encode('contracts', $this->contract_id);
|
||||
}
|
||||
|
||||
public function getContractTemplateObligationHashIdAttribute()
|
||||
{
|
||||
return Hasher::encode('contract_template_obligations', $this->contract_template_obligation_id);
|
||||
}
|
||||
|
||||
public function getContractEntityHashIdAttribute()
|
||||
{
|
||||
return Hasher::encode('contract_entities', $this->contract_entity_id);
|
||||
}
|
||||
|
||||
public function getContractListAttribute()
|
||||
{
|
||||
return $this->contract()->get()->makeHidden(['contract_obligation_list']);
|
||||
|
||||
Reference in New Issue
Block a user