<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Support\Carbon;

/**
 * @property int $id
 * @property int $prospect_id
 * @property int|null $user_id
 * @property string $channel
 * @property string|null $stage_from
 * @property string|null $stage_to
 * @property string $summary
 * @property Carbon|null $created_at
 */
#[Fillable(['prospect_id', 'user_id', 'channel', 'stage_from', 'stage_to', 'summary'])]
class ProspectInteraction extends Model
{
    public const CHANNELS = ['nota', 'llamada', 'whatsapp', 'correo', 'visita', 'cotizacion'];

    /** @return BelongsTo<Prospect, $this> */
    public function prospect(): BelongsTo
    {
        return $this->belongsTo(Prospect::class);
    }

    /** @return BelongsTo<User, $this> */
    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class);
    }
}
