<?php
namespace Hilco\Models;

/**
 * Created by PhpStorm.
 * User: jmartinez
 * Date: 5/18/2017
 * Time: 3:38 PM
 */

class PromotionCarrierCodeAction extends PromotionActionDetails {
    protected $table = 'PromotionCarrierCodeActions';
    protected $fillable = ['carrier_id', 'commit_sequence'];

    public function carrier(){
        return $this->belongsTo(Carrier::class, 'carrier_id', 'id');
    }

    public function promotion() {
        return $this->morphToMany(Promotion::class, 'action',
                                'PromotionActions', 'promotion_id',
                        'promotioncarriercodeaction_id');
    }

    public function takeAction(Customer $soldToCustomer, $webCartItems, &$status) {
        // TODO: Implement takeAction() method.
    }
}