update deploy
This commit is contained in:
56
app/Models/CourseSchedule.php
Normal file
56
app/Models/CourseSchedule.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Database\Factories\CourseScheduleFactory;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class CourseSchedule extends Model
|
||||
{
|
||||
/** @use HasFactory<CourseScheduleFactory> */
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* @var list<string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'course_id',
|
||||
'start_date',
|
||||
'end_date',
|
||||
'location',
|
||||
'instructor',
|
||||
'quota',
|
||||
'available_seats',
|
||||
'enrolled_count',
|
||||
'price_override',
|
||||
'status',
|
||||
'is_urgent',
|
||||
'notes',
|
||||
];
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'start_date' => 'date',
|
||||
'end_date' => 'date',
|
||||
'quota' => 'integer',
|
||||
'available_seats' => 'integer',
|
||||
'enrolled_count' => 'integer',
|
||||
'price_override' => 'decimal:2',
|
||||
'is_urgent' => 'boolean',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo<Course, $this>
|
||||
*/
|
||||
public function course(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Course::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user