migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\RestaurantDelivery\Contracts;
|
||||
|
||||
use Modules\RestaurantDelivery\Models\Delivery;
|
||||
use Modules\RestaurantDelivery\Models\Rider;
|
||||
|
||||
interface EarningsCalculatorInterface
|
||||
{
|
||||
/**
|
||||
* Calculate earnings for a delivery.
|
||||
*/
|
||||
public function calculateForDelivery(Delivery $delivery): array;
|
||||
|
||||
/**
|
||||
* Calculate base earnings.
|
||||
*/
|
||||
public function calculateBaseEarnings(Delivery $delivery): float;
|
||||
|
||||
/**
|
||||
* Calculate distance-based earnings.
|
||||
*/
|
||||
public function calculateDistanceEarnings(Delivery $delivery): float;
|
||||
|
||||
/**
|
||||
* Calculate applicable bonuses.
|
||||
*/
|
||||
public function calculateBonuses(Delivery $delivery, Rider $rider): array;
|
||||
|
||||
/**
|
||||
* Calculate applicable penalties.
|
||||
*/
|
||||
public function calculatePenalties(Delivery $delivery, Rider $rider): array;
|
||||
|
||||
/**
|
||||
* Calculate commission.
|
||||
*/
|
||||
public function calculateCommission(float $grossAmount, Rider $rider): array;
|
||||
|
||||
/**
|
||||
* Get rider's earnings summary for a period.
|
||||
*/
|
||||
public function getRiderEarningsSummary(Rider $rider, string $period = 'week'): array;
|
||||
}
|
||||
Reference in New Issue
Block a user