Changeset View
Changeset View
Standalone View
Standalone View
src/app/Sku.php
<?php | <?php | ||||
namespace App; | namespace App; | ||||
use Illuminate\Database\Eloquent\Model; | use Illuminate\Database\Eloquent\Model; | ||||
use Spatie\Translatable\HasTranslations; | use Spatie\Translatable\HasTranslations; | ||||
use App\Traits\UuidStrKeyTrait; | |||||
/** | /** | ||||
* The eloquent definition of a Stock Keeping Unit (SKU). | * The eloquent definition of a Stock Keeping Unit (SKU). | ||||
* | * | ||||
* @property bool $active | * @property bool $active | ||||
* @property int $cost | * @property int $cost | ||||
* @property string $description | * @property string $description | ||||
* @property int $fee The fee that the tenant pays to us | * @property int $fee The fee that the tenant pays to us | ||||
* @property string $handler_class | * @property string $handler_class | ||||
* @property string $id | * @property string $id | ||||
* @property string $name | * @property string $name | ||||
* @property string $period | * @property string $period | ||||
* @property ?int $tenant_id | * @property ?int $tenant_id | ||||
* @property string $title | * @property string $title | ||||
* @property int $units_free | * @property int $units_free | ||||
*/ | */ | ||||
class Sku extends Model | class Sku extends Model | ||||
{ | { | ||||
use HasTranslations; | use HasTranslations; | ||||
use UuidStrKeyTrait; | |||||
public $incrementing = false; | |||||
protected $keyType = 'string'; | |||||
protected $casts = [ | protected $casts = [ | ||||
'units_free' => 'integer' | 'units_free' => 'integer' | ||||
]; | ]; | ||||
protected $fillable = [ | protected $fillable = [ | ||||
'active', | 'active', | ||||
'cost', | 'cost', | ||||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |