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