<?php
namespace Database\Factories;
use App\Models\{Asset,Invoice,Merchant}; use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Str;
final class InvoiceFactory extends Factory { protected $model=Invoice::class; public function definition(): array { return ['public_id'=>'pay_'.Str::ulid(),'merchant_id'=>Merchant::factory(),'environment'=>'sandbox','order_id'=>'ORDER-'.fake()->unique()->numerify('#####'),'price_amount_minor'=>5000,'price_currency'=>'USD','pay_asset_id'=>Asset::factory(),'quoted_pay_amount_atomic'=>'50000000','paid_amount_atomic'=>'0','status'=>'waiting','expires_at'=>now()->addMinutes(20),'metadata'=>[]]; } }
