promotion

package
v0.0.0-...-82c544f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccumulateConfig

type AccumulateConfig struct {
	AccumulateValue int64 `json:"accumulate_value"`
}

type GiftRuleInfo

type GiftRuleInfo struct {
	// Judgment mode of level rule or ladder rule
	JudgeMode int32 `json:"judge_mode"`

	// Activity type
	ActionMode int32 `json:"action_mode"`

	// Level rule list, exists when judge_mode == 1
	GiftLevelList []LevelRule `json:"gift_level_list"`

	// Ladder rule list, exists when judge_mode == 2
	GiftLadderList []LaderRule `json:"gift_ladder_list"`

	// Ladder mode, exists when judge_mode == 2
	GiftLadderMode int32 `json:"gift_ladder_mode"`

	GiftLaderPattern int32 `json:"gift_ladder_pattern"`

	LadderProductNum map[string]int64 `json:"ladder_product_num"`
}

type LaderRule

type LaderRule struct {

	// Left boundary of the cumulative value of multiple items
	BeginNumber int64 `json:"begin_number"`

	// Right boundary of the cumulative value of multiple items
	EndNumber int64 `json:"end_number"`

	// Item ID
	ProductId string `json:"product_id"`

	// Ladder ID
	LaderId string `json:"ladder_id"`

	// Gift items and their quantities
	LadderGiftProducts map[string]int64 `json:"ladder_gift_products"`

	// Ladder limit configuration
	LaderLimit map[string]ResourceConfInfo `json:"ladder_limit"`

	// Remaining limit
	RemainLimit map[string]LimitRemainDataInfo `json:"remain_limit"`

	// Gift item proportion, gift quantity = total purchase * ladder_gift_products quantity / proportion, round up
	ProductsProportion map[string]int64 `json:"products_proportion"`
}

type LevelRule

type LevelRule struct {

	// Purchase item rules, key is item ID, value is purchase quantity
	BuyRuleProducts map[string]int64 `json:"buy_rule_products"`

	// Gift item rules, key is item ID, value is gift quantity
	GiftProducts map[string]int64 `json:"gift_products"`

	// Level ID
	LevelId string `json:"level_id"`

	// Level limit configuration, key is product_id, value is the corresponding limit information
	LevelLimit map[string]ResourceConfInfo `json:"level_limit"`

	// Remaining limit, key is product_id, value is remaining limit
	RemainLimit map[string]LimitRemainDataInfo `json:"remain_limit"`
}

type LimitConfValue

type LimitConfValue struct {

	// User item dimension restriction
	AcctQuata LimitNum `json:"acct_quata"`
}

type LimitNum

type LimitNum struct {
	Day   int64 `json:"day"`   // Daily limit
	Week  int64 `json:"week"`  // Weekly limit
	Month int64 `json:"month"` // Monthly limit
	Total int64 `json:"total"` // Total limit
}

type LimitRemainDataInfo

type LimitRemainDataInfo struct {

	// User item dimension restriction
	AccountQuata LimitNum `json:"account_quata"`

	// Resource ID, when resource_id == "qua" it represents the activity level remaining limit
	ResourceId string `json:"resource_id"`
}

type ModelConf

type ModelConf struct {
	// Model name
	ModelName string `json:"model_name"`

	// Start time
	BeginTime int64 `json:"begin_time"`

	// End time
	EndTime int64 `json:"end_time"`

	// Status
	State int32 `json:"states"`
}

type ModelDetail

type ModelDetail struct {
	// Buy gift rules
	GiftRuleInfo GiftRuleInfo `json:"gift_rule_info"`

	// Accumulation rules
	AccumulateConfig AccumulateConfig `json:"accumulate_config"`

	// Model configuration
	ModelConf ModelConf `json:"model_conf"`
}

func ParseModelDetail

func ParseModelDetail(ctx context.Context, typ int32, detail string) (*ModelDetail, error)

ParseModelDetail parse model details according to model_type.

type ResourceConfInfo

type ResourceConfInfo struct {
	// Limit information
	LimitConfValue LimitConfValue `json:"limit_conf_value"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL