feat: 开放API产品相关
This commit is contained in:
19
app/openapi/model/ProductRelatedModel.php
Normal file
19
app/openapi/model/ProductRelatedModel.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
declare (strict_types = 1);
|
||||
|
||||
namespace app\openapi\model;
|
||||
|
||||
use app\common\model\ProductRelatedBaseModel;
|
||||
|
||||
/**
|
||||
* 产品 - 相关产品模型
|
||||
* @mixin \think\Model
|
||||
*/
|
||||
class ProductRelatedModel extends ProductRelatedBaseModel
|
||||
{
|
||||
// 关联产品
|
||||
public function product()
|
||||
{
|
||||
return $this->belongsTo(ProductModel::class, 'related_product_id', 'id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user