<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Tier extends Model
{
    protected $fillable = [
        'name',
        'slug',
        'min_spend_per_visit',
        'visit_frequency_months',
        'visits_per_period',
        'points_threshold_3months',
        'display_order',
        'color_class',
    ];

    public function members()
    {
        return $this->hasMany(MemberTier::class)->where('is_current', true);
    }
}
