diff --git a/app/adminapi/logic/bid/BidBiddingDecisionLogic.php b/app/adminapi/logic/bid/BidBiddingDecisionLogic.php index af7c5c9ba..fe5810baf 100644 --- a/app/adminapi/logic/bid/BidBiddingDecisionLogic.php +++ b/app/adminapi/logic/bid/BidBiddingDecisionLogic.php @@ -133,6 +133,8 @@ class BidBiddingDecisionLogic extends BaseLogic */ public static function detail($params): array { - return BidBiddingDecision::findOrEmpty($params['id'])->toArray(); + $bidBiddingDecision = BidBiddingDecision::findOrEmpty($params['id']); + $bidBiddingDecision->project = $bidBiddingDecision->project; + return $bidBiddingDecision->toArray(); } } \ No newline at end of file diff --git a/app/adminapi/logic/bid/BidBuyBiddingDocumentLogic.php b/app/adminapi/logic/bid/BidBuyBiddingDocumentLogic.php index f439fe9c8..0e31236b0 100644 --- a/app/adminapi/logic/bid/BidBuyBiddingDocumentLogic.php +++ b/app/adminapi/logic/bid/BidBuyBiddingDocumentLogic.php @@ -132,6 +132,8 @@ class BidBuyBiddingDocumentLogic extends BaseLogic */ public static function detail($params): array { - return BidBuyBiddingDocument::findOrEmpty($params['id'])->toArray(); + $bidBuyBiddingDocument = BidBuyBiddingDocument::findOrEmpty($params['id']); + $bidBuyBiddingDocument->project = $bidBuyBiddingDocument->project; + return $bidBuyBiddingDocument->toArray(); } } \ No newline at end of file diff --git a/app/common/model/bid/BidBiddingDecision.php b/app/common/model/bid/BidBiddingDecision.php index 00f66776f..ef0b15121 100644 --- a/app/common/model/bid/BidBiddingDecision.php +++ b/app/common/model/bid/BidBiddingDecision.php @@ -30,5 +30,10 @@ class BidBiddingDecision extends BaseModel protected $name = 'bid_bidding_decision'; protected $deleteTime = 'delete_time'; + public function project() + { + return $this->belongsTo(\app\common\model\project\Project::class, 'project_id'); + } + } \ No newline at end of file diff --git a/app/common/model/bid/BidBuyBiddingDocument.php b/app/common/model/bid/BidBuyBiddingDocument.php index f5fd0489a..ff0ae8d53 100644 --- a/app/common/model/bid/BidBuyBiddingDocument.php +++ b/app/common/model/bid/BidBuyBiddingDocument.php @@ -30,5 +30,9 @@ class BidBuyBiddingDocument extends BaseModel protected $name = 'bid_buy_bidding_document'; protected $deleteTime = 'delete_time'; + public function project() + { + return $this->belongsTo(\app\common\model\project\Project::class, 'project_id'); + } } \ No newline at end of file