59 lines
1.4 KiB
PHP
59 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Database\Factories\ManufacturerFactory;
|
|
use Eloquent;
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Carbon;
|
|
|
|
/**
|
|
* App\Models\Manufacturer
|
|
*
|
|
* @property string $name
|
|
* @property string $displayName
|
|
* @method static ManufacturerFactory factory($count = null, $state = [])
|
|
* @method static Builder|Manufacturer newModelQuery()
|
|
* @method static Builder|Manufacturer newQuery()
|
|
* @method static Builder|Manufacturer query()
|
|
* @method static Builder|Manufacturer whereName($value)
|
|
* @method static Builder|Manufacturer whereDisplayName($value)
|
|
* @mixin Eloquent
|
|
*/
|
|
class Manufacturer extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $primaryKey = 'name';
|
|
protected $table = 'manufacturers';
|
|
public $incrementing = false;
|
|
public $timestamps = false;
|
|
protected $guarded = [];
|
|
|
|
public function getName(): string
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
public function setName(string $name): Manufacturer
|
|
{
|
|
$this->name = $name;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getDisplayName(): string
|
|
{
|
|
return $this->displayName;
|
|
}
|
|
|
|
public function setDisplayName(string $displayName): Manufacturer
|
|
{
|
|
$this->displayName = $displayName;
|
|
|
|
return $this;
|
|
}
|
|
}
|