ldc-enum/tests/Models/Report.php

59 lines
1,008 B
PHP
Raw Normal View History

2021-09-12 00:12:49 +02:00
<?php
namespace Kwaadpepper\Enum\Tests\Models;
use Illuminate\Database\Eloquent\Model;
use Kwaadpepper\Enum\Tests\Enums\Days;
use Kwaadpepper\Enum\Traits\CastsEnums;
class Report extends Model
{
use CastsEnums;
2023-05-30 09:27:27 +02:00
/**
* Indicates if the model should be timestamped.
*
* @var boolean
*/
2021-09-12 00:12:49 +02:00
public $timestamps = false;
2023-05-30 09:27:27 +02:00
/**
* The primary key for the model.
*
* @var string
*/
2021-09-12 00:12:49 +02:00
protected $primaryKey = 'day';
2023-05-30 09:27:27 +02:00
/**
* The "type" of the primary key ID.
*
* @var string
*/
2021-09-12 00:12:49 +02:00
protected $keyType = 'int';
2023-05-30 09:27:27 +02:00
/**
* Indicates if the IDs are auto-incrementing.
*
* @var boolean
*/
2021-09-12 00:12:49 +02:00
public $incrementing = false;
2023-05-30 09:27:27 +02:00
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
2021-09-12 00:12:49 +02:00
protected $fillable = [
'day'
];
2023-05-30 09:27:27 +02:00
/**
* The attributes that should be to enum.
*
* @var string[]
*/
2021-09-12 00:12:49 +02:00
protected $enumCasts = [
'day' => Days::class
];
}