vat_wms/app/Models/StockAttributesTranslation.php
2025-05-13 12:32:55 +02:00

53 lines
1.1 KiB
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class StockAttributesTranslation extends Model
{
use HasFactory;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'stock_attributes_translation';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'stock_attributes_id',
'language_id',
'translated_name',
];
/**
* Indicates if the model has a primary key.
*
* @var bool
*/
public $incrementing = false;
/**
* The primary key for the model.
*
* @var array
*/
protected $primaryKey = ['stock_attributes_id', 'language_id'];
/**
* Get the attribute that this translation belongs to.
*/
public function attribute(): BelongsTo
{
return $this->belongsTo(StockAttributes::class, 'stock_attributes_id');
}
}