package ebaiapi

import "git.rosy.net.cn/baseapi/platformapi"

const (
	allAPI = "all"
)

var (
	apiLimitConfigs = map[string]*platformapi.LimiterConfig{
		// allAPI: &platformapi.LimiterConfig{
		// 	MaxAccessCount:     5,
		// 	TimeGapMilliSecond: 1000,
		// },
		"sku.shop.category.update": &platformapi.LimiterConfig{
			MaxAccessCount:     5 - 1,
			TimeGapMilliSecond: 1000,
		},
		"sku.shop.category.delete": &platformapi.LimiterConfig{
			MaxAccessCount:     5 - 1,
			TimeGapMilliSecond: 1000,
		},
		"sku.create": &platformapi.LimiterConfig{
			MaxAccessCount:     5 - 1,
			TimeGapMilliSecond: 1000,
		},
		"sku.online": &platformapi.LimiterConfig{
			MaxAccessCount:     1,
			TimeGapMilliSecond: 1000 + 200,
		},
		"sku.online.one": &platformapi.LimiterConfig{
			MaxAccessCount:     10 - 1,
			TimeGapMilliSecond: 1000,
		},
		"sku.offline": &platformapi.LimiterConfig{
			MaxAccessCount:     1,
			TimeGapMilliSecond: 1000 + 200,
		},
		"sku.offline.one": &platformapi.LimiterConfig{
			MaxAccessCount:     10 - 1,
			TimeGapMilliSecond: 1000,
		},
		"sku.update": &platformapi.LimiterConfig{
			MaxAccessCount:     5 - 1,
			TimeGapMilliSecond: 1000,
		},
		"sku.list": &platformapi.LimiterConfig{
			MaxAccessCount:     5 - 1,
			TimeGapMilliSecond: 1000,
		},
		"sku.price.update.batch": &platformapi.LimiterConfig{
			MaxAccessCount:     1,
			TimeGapMilliSecond: 1000 + 200,
		},
		"sku.stock.update.batch": &platformapi.LimiterConfig{
			MaxAccessCount:     2,
			TimeGapMilliSecond: 1000 + 200,
		},
		"sku.delete": &platformapi.LimiterConfig{
			MaxAccessCount:     1,
			TimeGapMilliSecond: 1000 + 200,
		},
		"sku.shop.category.create": &platformapi.LimiterConfig{
			MaxAccessCount:     5 - 1,
			TimeGapMilliSecond: 1000,
		},
		"sku.shop.category.map": &platformapi.LimiterConfig{
			MaxAccessCount:     10 - 1,
			TimeGapMilliSecond: 1000,
		},
		"sku.category.list": &platformapi.LimiterConfig{
			MaxAccessCount:     1,
			TimeGapMilliSecond: 1000 + 200,
		},
		"sku.brand.list": &platformapi.LimiterConfig{
			MaxAccessCount:     5 - 1,
			TimeGapMilliSecond: 1000,
		},
		"sku.shop.category.get": &platformapi.LimiterConfig{
			MaxAccessCount:     5 - 1,
			TimeGapMilliSecond: 1000,
		},
	}

	// defaultAPILimitConfig = &platformapi.LimiterConfig{
	// 	MaxAccessCount:     5 - 1,
	// 	TimeGapMilliSecond: 1000,
	// }
)
