mirror of
https://github.com/nihonbuzz/nihonbuzz-academy.git
synced 2026-01-26 05:25:37 +07:00
34 lines
745 B
PHP
34 lines
745 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Concerns\HasUuids;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class SrsReview extends Model
|
|
{
|
|
use HasFactory, HasUuids;
|
|
|
|
protected $fillable = [
|
|
'user_id', 'vocabulary_id', 'ease_factor', 'interval',
|
|
'repetitions', 'next_review_at', 'last_review_at', 'status'
|
|
];
|
|
|
|
protected $casts = [
|
|
'ease_factor' => 'decimal:2',
|
|
'next_review_at' => 'datetime',
|
|
'last_review_at' => 'datetime',
|
|
];
|
|
|
|
public function vocabulary()
|
|
{
|
|
return $this->belongsTo(Vocabulary::class);
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|