<?php

namespace Hilco\Models;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\MorphTo;
use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\DB;
use LogicException;

abstract class PromotionTriggerDetails extends WebModel
{
    public function trigger() {
        return $this->hasOne(PromotionTrigger::class, 'trigger_id', 'id');
    }

    public function hasAlmostQualifyingField() {
        return false;
    }

    public abstract function isTriggered(Customer $soldToCustomer, $webCartItems, $distinctPartInfo = []);

    public abstract function postTriggerOperation($soldToCustomer);

    use HasCommitSequence;
}
