增加出售设置

This commit is contained in:
yml2213
2026-05-23 20:43:01 +08:00
parent 9cec71ab1a
commit 9f15609afd
8 changed files with 303 additions and 8 deletions
@@ -52,6 +52,7 @@ type PublishOptionsDTO struct {
FireLevelMin int `json:"fire_level_min"`
PriceConfig PublishPriceConfig `json:"price_config"`
RatioConfig PublishRatioConfig `json:"ratio_config"`
SalePriceConfig PublishSalePriceConfig `json:"sale_price_config"`
}
type PublishOptionGroup struct {
@@ -103,3 +104,20 @@ type PublishCoinCorrection struct {
ThresholdM float64 `json:"threshold_m"`
Correction float64 `json:"correction"`
}
type PublishSalePriceConfig struct {
FixedMarkupRules []PublishSaleFixedMarkupRule `json:"fixed_markup_rules"`
RatioAdjustmentRules []PublishSaleRatioAdjustmentRule `json:"ratio_adjustment_rules"`
}
type PublishSaleFixedMarkupRule struct {
MinM float64 `json:"min_m"`
MaxM float64 `json:"max_m"`
MarkupAmount float64 `json:"markup_amount"`
}
type PublishSaleRatioAdjustmentRule struct {
MinM float64 `json:"min_m"`
MaxM float64 `json:"max_m,omitempty"`
RatioSubtract float64 `json:"ratio_subtract"`
}