| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Factories\HasFactory;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\Relations\BelongsTo;
- use Illuminate\Database\Eloquent\SoftDeletes;
- /**
- * @property int $id
- * @property int $unit_id
- * @property string $holiday_date
- * @property string $description
- * @property \Carbon\Carbon $created_at
- * @property \Carbon\Carbon $updated_at
- * @property \Carbon\Carbon|null $deleted_at
- */
- class Holiday extends Model
- {
- use HasFactory, SoftDeletes;
- protected $table = 'holidays';
- protected $guarded = ['id'];
- protected $casts = [
- 'holiday_date' => 'date',
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- ];
- public function unit(): BelongsTo
- {
- return $this->belongsTo(Unit::class);
- }
- }
|