<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;

class SegmentTrackingConfig extends Model
{
    protected $table      = 'segment_tracking_config';
    protected $connection = 'default';
    protected $primaryKey = 'produit_id';
    public $incrementing  = false;
    public $timestamps    = false;

    protected $fillable = [
        'produit_id', 'wake_distance_m', 'high_accuracy_start_distance_m',
        'pulse_high_accuracy_duration_s', 'pulse_low_accuracy_duration_s',
        'finish_high_accuracy_distance_m', 'cooldown_distance_m', 'cooldown_time_s',
        'strava_dedup_window_minutes',
    ];

    public function produit() { return $this->belongsTo(Produit::class, 'produit_id'); }
}
