<?php
/**
 * Created by PhpStorm.
 * User: brian
 * Date: 7/16/18
 * Time: 4:18 PM
 */

namespace Hilco\Models;
use Illuminate\Database\Eloquent\Model;

/**
 * Hilco\Models\ApprovalReasons
 *
 * @property integer $id
 * @property string $name
 * @property string $date_created
 * @property string $date_modified
 * @property string $date_uploaded
 * @property string $commit_sequence
 * @property string $deleted_at
 * @method static \Illuminate\Database\Query\Builder|\Hilco\Models\ApprovalReasons whereId($value)
 * @method static \Illuminate\Database\Query\Builder|\Hilco\Models\ApprovalReasons whereName($value)
 * @method static \Illuminate\Database\Query\Builder|\Hilco\Models\ApprovalReasons whereDateCreated($value)
 * @method static \Illuminate\Database\Query\Builder|\Hilco\Models\ApprovalReasons whereDateModified($value)
 * @method static \Illuminate\Database\Query\Builder|\Hilco\Models\ApprovalReasons whereDateUploaded($value)
 * @method static \Illuminate\Database\Query\Builder|\Hilco\Models\ApprovalReasons whereCommitSequence($value)
 * @method static \Illuminate\Database\Query\Builder|\Hilco\Models\ApprovalReasons whereDeletedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\Hilco\Models\ApprovalReasons byName($approvalReasonName)
 * @mixin \Eloquent
 */

class ApprovalReasons extends WebModel {

    protected $table = "ApprovalReasons";

    const FREIGHT_WEB_ERROR_APPROVAL = 'Freight Web Error Approval';

    public function scopeByName($query, $approvalReasonName) {
        return $query->where('name', $approvalReasonName);
    }
}