| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 | <?phpnamespace App\Search\Events;use App\Models\Company;use App\Models\Jobs;use App\Models\Resume;/** * 搜索引擎更新事件,用于触发搜索引擎数据更新事件 * Class SearchUpdateEvent * @package App\Search\Events * Auth Zhong * Date 2019/1/22 */class SearchUpdateEvent{    const MODEL_JOB = Jobs::class;    const MODEL_COMPANY = Company::class;    const MODEL_RESUME = Resume::class;    const OPERATE_UPDATE = 'update';    const OPERATE_DELETE = 'delete';    /**     * @var string 修改的模型     */    public $changeModel;    /**     * @var mixed 查询条件     */    public $where;    /**     * @var string 更新类型:更新,删除     */    public $type;    /**     * SearchUpdateEvent constructor.     * @param string $changeModel     * @param mixed $where string为id字符串     * @param string $type     */    public function __construct(string $changeModel, $where, string $type)    {        $this->changeModel = $changeModel;        $this->where = $where;        $this->type = $type;    }}
 |