<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class RiderRevenueCollection extends Model
{
    protected $fillable = [
        'delivery_man_id',
        'product_amount',
        'commission_amount',
        'total_amount',
        'status',
        'otp',
        'otp_expires_at',
        'collected_by',
        'collected_at',
        'note',
    ];

    protected $casts = [
        'product_amount' => 'float',
        'commission_amount' => 'float',
        'total_amount' => 'float',
        'otp_expires_at' => 'datetime',
        'collected_at' => 'datetime',
    ];

    public function deliveryMan()
    {
        return $this->belongsTo(DeliveryMan::class);
    }
}
