doku
This commit is contained in:
@@ -1005,12 +1005,12 @@ final class MiningRepository
|
||||
'INSERT INTO ' . $this->table('purchased_miners') . ' (
|
||||
project_key, owner_sub, miner_offer_id, purchased_at, label, runtime_months,
|
||||
mining_speed_value, mining_speed_unit, bonus_speed_value, bonus_speed_unit,
|
||||
total_cost_amount, currency, usd_reference_amount, reference_price_amount, reference_price_currency, settled_value_amount, settled_value_currency,
|
||||
total_cost_amount, currency, usd_reference_amount, reference_price_amount, reference_price_currency, settled_value_amount, settled_value_currency, settled_fx_fetch_id,
|
||||
daily_cost_amount, daily_cost_currency, auto_renew, note, is_active
|
||||
) VALUES (
|
||||
:project_key, :owner_sub, :miner_offer_id, :purchased_at, :label, :runtime_months,
|
||||
:mining_speed_value, :mining_speed_unit, :bonus_speed_value, :bonus_speed_unit,
|
||||
:total_cost_amount, :currency, :usd_reference_amount, :reference_price_amount, :reference_price_currency, :settled_value_amount, :settled_value_currency,
|
||||
:total_cost_amount, :currency, :usd_reference_amount, :reference_price_amount, :reference_price_currency, :settled_value_amount, :settled_value_currency, :settled_fx_fetch_id,
|
||||
:daily_cost_amount, :daily_cost_currency, :auto_renew, :note, :is_active
|
||||
)
|
||||
RETURNING *'
|
||||
@@ -1023,12 +1023,12 @@ final class MiningRepository
|
||||
'INSERT INTO ' . $this->table('purchased_miners') . ' (
|
||||
project_key, owner_sub, miner_offer_id, purchased_at, label, runtime_months,
|
||||
mining_speed_value, mining_speed_unit, bonus_speed_value, bonus_speed_unit,
|
||||
total_cost_amount, currency, usd_reference_amount, reference_price_amount, reference_price_currency, settled_value_amount, settled_value_currency,
|
||||
total_cost_amount, currency, usd_reference_amount, reference_price_amount, reference_price_currency, settled_value_amount, settled_value_currency, settled_fx_fetch_id,
|
||||
daily_cost_amount, daily_cost_currency, auto_renew, note, is_active
|
||||
) VALUES (
|
||||
:project_key, :owner_sub, :miner_offer_id, :purchased_at, :label, :runtime_months,
|
||||
:mining_speed_value, :mining_speed_unit, :bonus_speed_value, :bonus_speed_unit,
|
||||
:total_cost_amount, :currency, :usd_reference_amount, :reference_price_amount, :reference_price_currency, :settled_value_amount, :settled_value_currency,
|
||||
:total_cost_amount, :currency, :usd_reference_amount, :reference_price_amount, :reference_price_currency, :settled_value_amount, :settled_value_currency, :settled_fx_fetch_id,
|
||||
:daily_cost_amount, :daily_cost_currency, :auto_renew, :note, :is_active
|
||||
)'
|
||||
);
|
||||
@@ -1059,6 +1059,7 @@ final class MiningRepository
|
||||
'reference_price_currency' => $payload['reference_price_currency'] ?? null,
|
||||
'settled_value_amount' => $payload['settled_value_amount'] ?? null,
|
||||
'settled_value_currency' => $payload['settled_value_currency'] ?? null,
|
||||
'settled_fx_fetch_id' => $payload['settled_fx_fetch_id'] ?? null,
|
||||
'daily_cost_amount' => $payload['daily_cost_amount'] ?? $this->deriveDailyCostAmount($payload['total_cost_amount'] ?? null, $payload['runtime_months'] ?? null),
|
||||
'daily_cost_currency' => $payload['daily_cost_currency'] ?? ($payload['currency'] ?? null),
|
||||
'auto_renew' => $payload['auto_renew'] ?? 0,
|
||||
@@ -1071,12 +1072,12 @@ final class MiningRepository
|
||||
'INSERT INTO ' . $this->table('purchased_miners') . ' (
|
||||
project_key, owner_sub, miner_offer_id, purchased_at, label, runtime_months,
|
||||
mining_speed_value, mining_speed_unit, bonus_speed_value, bonus_speed_unit,
|
||||
total_cost_amount, currency, usd_reference_amount, reference_price_amount, reference_price_currency, settled_value_amount, settled_value_currency,
|
||||
total_cost_amount, currency, usd_reference_amount, reference_price_amount, reference_price_currency, settled_value_amount, settled_value_currency, settled_fx_fetch_id,
|
||||
daily_cost_amount, daily_cost_currency, auto_renew, note, is_active
|
||||
) VALUES (
|
||||
:project_key, :owner_sub, :miner_offer_id, :purchased_at, :label, :runtime_months,
|
||||
:mining_speed_value, :mining_speed_unit, :bonus_speed_value, :bonus_speed_unit,
|
||||
:total_cost_amount, :currency, :usd_reference_amount, :reference_price_amount, :reference_price_currency, :settled_value_amount, :settled_value_currency,
|
||||
:total_cost_amount, :currency, :usd_reference_amount, :reference_price_amount, :reference_price_currency, :settled_value_amount, :settled_value_currency, :settled_fx_fetch_id,
|
||||
:daily_cost_amount, :daily_cost_currency, :auto_renew, :note, :is_active
|
||||
)
|
||||
RETURNING *'
|
||||
@@ -1089,12 +1090,12 @@ final class MiningRepository
|
||||
'INSERT INTO ' . $this->table('purchased_miners') . ' (
|
||||
project_key, owner_sub, miner_offer_id, purchased_at, label, runtime_months,
|
||||
mining_speed_value, mining_speed_unit, bonus_speed_value, bonus_speed_unit,
|
||||
total_cost_amount, currency, usd_reference_amount, reference_price_amount, reference_price_currency, settled_value_amount, settled_value_currency,
|
||||
total_cost_amount, currency, usd_reference_amount, reference_price_amount, reference_price_currency, settled_value_amount, settled_value_currency, settled_fx_fetch_id,
|
||||
daily_cost_amount, daily_cost_currency, auto_renew, note, is_active
|
||||
) VALUES (
|
||||
:project_key, :owner_sub, :miner_offer_id, :purchased_at, :label, :runtime_months,
|
||||
:mining_speed_value, :mining_speed_unit, :bonus_speed_value, :bonus_speed_unit,
|
||||
:total_cost_amount, :currency, :usd_reference_amount, :reference_price_amount, :reference_price_currency, :settled_value_amount, :settled_value_currency,
|
||||
:total_cost_amount, :currency, :usd_reference_amount, :reference_price_amount, :reference_price_currency, :settled_value_amount, :settled_value_currency, :settled_fx_fetch_id,
|
||||
:daily_cost_amount, :daily_cost_currency, :auto_renew, :note, :is_active
|
||||
)'
|
||||
);
|
||||
@@ -1650,6 +1651,7 @@ final class MiningRepository
|
||||
'reference_price_currency' => $payload['reference_price_currency'] ?? null,
|
||||
'settled_value_amount' => $payload['settled_value_amount'] ?? null,
|
||||
'settled_value_currency' => $payload['settled_value_currency'] ?? null,
|
||||
'settled_fx_fetch_id' => $payload['settled_fx_fetch_id'] ?? null,
|
||||
'daily_cost_amount' => $dailyCostAmount,
|
||||
'daily_cost_currency' => $dailyCostCurrency,
|
||||
'auto_renew' => $payload['auto_renew'] ?? 0,
|
||||
|
||||
Reference in New Issue
Block a user