File: D:/HostingSpaces/SBogers10/firetech.komma.pro/app/KommaApp/Shop/Properties/Models/PropertyKey.php
<?php
namespace App\KommaApp\Shop\Properties\Models;
use App\KommaApp\Kms\Core\AbstractTranslatableModel;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\HasOne;
/**
* Class PropertyKey
*
* @property-read integer $id
*
* Represents a property key that could be for example represent "color".
* It does not represent the value that could for example be "green".
* The translations associated to it would be in the case of "color",
* the translations for the word "color" in multiple languages.
* @package App\KommaApp\Shop\Properties\Models
* @property \Carbon\Carbon|null $created_at
* @property \Carbon\Carbon|null $updated_at
* @property-read \App\KommaApp\Shop\Properties\Models\Property $property
* @property-read \App\KommaApp\Shop\Properties\Models\PropertyKeyTranslation $translation
* @property-read \Illuminate\Database\Eloquent\Collection|\App\KommaApp\Shop\Properties\Models\PropertyKeyTranslation[] $translations
* @method static \Illuminate\Database\Eloquent\Builder|\App\KommaApp\Shop\Properties\Models\PropertyKey whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\KommaApp\Shop\Properties\Models\PropertyKey whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\KommaApp\Shop\Properties\Models\PropertyKey whereUpdatedAt($value)
* @mixin \Eloquent
* @method static \Illuminate\Database\Eloquent\Builder|\App\KommaApp\Shop\Properties\Models\PropertyKey newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\KommaApp\Shop\Properties\Models\PropertyKey newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\KommaApp\Shop\Properties\Models\PropertyKey query()
*/
class PropertyKey extends AbstractTranslatableModel
{
/*
* Transient properties on Eloquent models
* These are not saved to database.
*/
public $thumbnail = false;
/**
* Gets the translation models for this model
*
* @return HasMany that resolves to AbstractTranslationModel instances
*/
public function translations(): HasMany
{
return $this->hasMany(PropertyKeyTranslation::class);
}
public function property(): HasOne
{
return $this->HasOne(Property::class);
}
}