44 lines
995 B
PHP
44 lines
995 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Models;
|
||
|
|
||
|
use Database\Factories\DriveTrainFactory;
|
||
|
use Eloquent;
|
||
|
use Illuminate\Database\Eloquent\Builder;
|
||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
||
|
/**
|
||
|
* App\Models\DriveTrain
|
||
|
*
|
||
|
* @property string $name
|
||
|
* @method static DriveTrainFactory factory($count = null, $state = [])
|
||
|
* @method static Builder|FuelType newModelQuery()
|
||
|
* @method static Builder|FuelType newQuery()
|
||
|
* @method static Builder|FuelType query()
|
||
|
* @method static Builder|FuelType whereName($value)
|
||
|
* @mixin Eloquent
|
||
|
*/
|
||
|
class DriveTrain extends Model
|
||
|
{
|
||
|
use HasFactory;
|
||
|
|
||
|
protected $primaryKey = 'name';
|
||
|
protected $table = 'drive_trains';
|
||
|
public $incrementing = false;
|
||
|
public $timestamps = false;
|
||
|
protected $guarded = [];
|
||
|
|
||
|
public function geteName(): string
|
||
|
{
|
||
|
return $this->name;
|
||
|
}
|
||
|
|
||
|
public function setName(string $name): DriveTrain
|
||
|
{
|
||
|
$this->name = $name;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
}
|