ldc-enum/tests/Models/Journal.php

68 lines
1.1 KiB
PHP
Raw Permalink 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 Journal extends Model
{
use CastsEnums;
2023-05-30 09:27:27 +02:00
/**
* The attributes that are mass assignable.
*
* @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 cast.
*
* @var string[]
*/
2021-09-12 00:12:49 +02:00
protected $casts = [
'day' => 'int'
];
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
];
}