<?php
/**
 * Created by PhpStorm.
 * User: brian
 * Date: 4/1/19
 * Time: 4:11 PM
 */

namespace Hilco\Models;


/**
 * Hilco\Models\ApplicationTranslationKey
 *
 * @property integer $id
 * @property string $application
 * @property string $component
 * @property string $key
 * @property string $description
 * @property string $deleted_at
 */
class ApplicationTranslationKey extends WebModel {

    protected $table = "ApplicationTranslationKeys";
    protected $fillable = [
        'application', 'component', 'key',
        'description', 'display_name'
    ];

    // Scopes
    public function scopeByApplicationComponentKey($query, $application, $component, $translationKey) {
        return $query->where('application', $application)->where('component', $component)->where('key', $translationKey);
    }

    public function scopeByApplicationComponent($query, $application, $component) {
        return $query->where('application', $application)->where('component', $component);
    }
}