<?php

namespace App\Console\Commands;

use App\Http\Helpers\StripeClient;
use App\Models\Wallet;
use Illuminate\Console\Command;

class PayoutMuhandisinMoney extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'money:payout';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'This command runs daily do payout for all available amount of muhadisin wallet which basically the profit of already approved milestone';

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {
        StripeClient::stripe()->payouts->create([
           'amount'=> Wallet::find(1)->avaiable_funds,
            'currency'=>'usd',
        ]);
    }
}
