<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class MetaOrderAttribution extends Model
{
    use HasFactory;

    protected $guarded = [];

    protected $casts = [
        'order_id' => 'integer',
        'attribution_window_days' => 'integer',
        'attributed_at' => 'datetime',
    ];

    public function order()
    {
        return $this->belongsTo(Order::class)->withoutGlobalScopes();
    }
}
