<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Relations\BelongsTo;

class LeadFollowup extends Model
{
    protected $fillable = [
        'lead_id',
        'followup_at',
        'status',
        'channel',
        'outcome',
        'meeting_at',
        'meeting_mode',
        'message',
        'notes',
        'reminder_sent_at',
        'completed_at',
        'created_by',
    ];

    protected $casts = [
        'followup_at' => 'datetime',
        'meeting_at' => 'datetime',
        'reminder_sent_at' => 'datetime',
        'completed_at' => 'datetime',
    ];

    public function lead(): BelongsTo
    {
        return $this->belongsTo(Lead::class);
    }

    public function createdBy(): BelongsTo
    {
        return $this->belongsTo(User::class, 'created_by');
    }
}
