morphOne(Task::class, 'taskable'); } public function store(): BelongsTo { return $this->belongsTo(Store::class); } public function storeMaster(): BelongsTo { return $this->belongsTo(Employee::class, 'store_master_id'); } /** * 此业绩指标是否已完成 */ public function isCompleted(): bool { return bccomp($this->actual_performance, $this->expected_performance, 2) >= 0; } }