<?php

namespace App\DTOs\ProductOwner;

class WalletBalanceData
{
    public function __construct(
        public float $balance,
        public string $currency = 'INR',
    ) {}

    public static function fromArray(array $data): self
    {
        return new self(
            balance: (float) ($data['balance'] ?? 0),
            currency: (string) ($data['currency'] ?? config('platform.currency', 'INR')),
        );
    }
}
