|
|
|
@ -28,6 +28,15 @@ class Feedback extends BaseModel |
|
|
|
|
// 定义主键 |
|
|
|
|
protected $pk = 'feedback_id'; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 关联模型:主图视频文件 |
|
|
|
|
* @return HasOne |
|
|
|
|
*/ |
|
|
|
|
public function store(): HasOne |
|
|
|
|
{ |
|
|
|
|
return $this->hasOne('Store', 'store_id', 'store_id'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 详情信息 |
|
|
|
@ -51,7 +60,7 @@ class Feedback extends BaseModel |
|
|
|
|
*/ |
|
|
|
|
public function getList(array $param = [], int $pageSize = 15): \think\Paginator |
|
|
|
|
{ |
|
|
|
|
$res = $this->where($this->getFilter($param)) |
|
|
|
|
$res = $this->with(['store.store_name'])->where($this->getFilter($param)) |
|
|
|
|
->where('is_delete', '=', 0) |
|
|
|
|
->order(['create_time' => 'desc', $this->getPk()]) |
|
|
|
|
->paginate($pageSize); |
|
|
|
|