contract obligation complete and accept api

This commit is contained in:
glovetleong
2021-07-27 13:36:51 +08:00
parent 7f209db917
commit 93b13a8f46
17 changed files with 550 additions and 20 deletions
+6
View File
@@ -13,6 +13,7 @@ class ContractObligation extends Model
protected $appends = [
'hash_id',
'contract_hash_id',
'contract_list',
'contract_obligation_dependency_list',
'depend_contract_obligation_dependency_list',
@@ -54,6 +55,11 @@ class ContractObligation extends Model
return Hasher::encode('contract_obligations', $this->id);
}
public function getContractHashIdAttribute()
{
return Hasher::encode('contracts', $this->contract_id);
}
public function getContractListAttribute()
{
return $this->contract()->get()->makeHidden(['contract_obligation_list']);