链街Dcat后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

48 lines
796 B

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Laravel\Scout\Searchable;
class LanzuGoods extends Model
{
use Searchable;
protected $table = 'lanzu_goods';
protected $dateFormat = 'U';
public function searchableAs()
{
return 'lanzu-goods-test';
}
public function toSearchableArray()
{
return [
'name' => $this->name,
'market_id' => $this->market_id,
'store_id' => $this->store_id,
];
}
/**
* 指定 搜索索引中存储的唯一ID
* @return mixed
*/
public function getScoutKey()
{
return $this->id;
}
/**
* 指定 搜索索引中存储的唯一ID的键名
* @return string
*/
public function getScoutKeyName()
{
return 'id';
}
}