47 lines
884 B
PHP
47 lines
884 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* @property int $id
|
|
* @property string $name
|
|
* @property float $amount The cost per day
|
|
* @property bool $published
|
|
* @method static \Database\Factories\PackageFactory factory($count = null, $state = [])
|
|
* @mixin \Eloquent
|
|
*/
|
|
class Package extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
/**
|
|
* Indicates if the model should be timestamped.
|
|
*
|
|
* @var boolean
|
|
*/
|
|
public $timestamps = false;
|
|
|
|
/**
|
|
* The attributes that are fillable.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'name',
|
|
'amount',
|
|
'published'
|
|
];
|
|
|
|
/**
|
|
* The attributes that should be cast.
|
|
*
|
|
* @var array<string, string>
|
|
*/
|
|
protected $casts = [
|
|
'published' => 'boolean',
|
|
];
|
|
|
|
}
|