generated from Flycro/laravel-nuxt
feat: Deadline Functionality
This commit is contained in:
27
app/Models/Deadline.php
Normal file
27
app/Models/Deadline.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Deadline extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'book_recommendation_id',
|
||||
'deadline',
|
||||
'target_page',
|
||||
'target_chapter',
|
||||
];
|
||||
|
||||
public function bookRecommendation()
|
||||
{
|
||||
return $this->belongsTo(BookRecommendation::class);
|
||||
}
|
||||
public function userDeadlines()
|
||||
{
|
||||
return $this->hasMany(UserDeadline::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user