<?php

namespace App\Models;
use Illuminate\Database\Eloquent\SoftDeletes;

class Milestone extends AbstractModel
{
    use SoftDeletes;

    protected $table = 'milestones';
    protected $dates = ['deleted_at'];

    public function progress()
    {
        return $this->hasMany(MilestoneProgress::class, 'milestone_id');
    }

    public function rewards()
    {
        return $this->belongsToMany(Reward::class, MilestoneReward::class);
    }
}
