package enum

// ActCouponType 优惠券类型
type ActCouponType int

const (
	ActCouponTypeImmediate     ActCouponType = iota + 1 // 立减
	ActCouponTypeReachReduce                            // 满减
	ActCouponTypeReachDiscount                          // 满折
)

func (em ActCouponType) String() string {
	switch em {
	case ActCouponTypeImmediate:
		return "立减券"
	case ActCouponTypeReachReduce:
		return "满减券"
	case ActCouponTypeReachDiscount:
		return "折扣券"
	default:
		return "未知类型"
	}
}

// ActCouponSendWay 发放形式
type ActCouponSendWay int

const (
	ActCouponSendWayPositive ActCouponSendWay = iota + 1
	ActCouponSendWayManual
)

func (em ActCouponSendWay) String() string {
	switch em {
	case ActCouponSendWayPositive:
		return "主动发放"
	case ActCouponSendWayManual:
		return "手动领取"
	default:
		return "未知类型"
	}
}

// ActCouponSendTimeType 发放时间类型
type ActCouponSendTimeType int

const (
	ActCouponSendTimeTypeImmediate ActCouponSendTimeType = iota + 1
	ActCouponSendTimeTypeTiming
)

func (em ActCouponSendTimeType) String() string {
	switch em {
	case ActCouponSendTimeTypeImmediate:
		return "立即发放"
	case ActCouponSendTimeTypeTiming:
		return "定时"
	default:
		return "未知类型"
	}
}

// ActCouponSendUserType 发放用户
type ActCouponSendUserType int

const (
	ActCouponSendUserTypeLevel ActCouponSendUserType = iota + 1
	ActCouponSendUserTypeAll
	ActCouponSendUserTypeSpecify
)

func (em ActCouponSendUserType) String() string {
	switch em {
	case ActCouponSendUserTypeLevel:
		return "指定会员等级"
	case ActCouponSendUserTypeAll:
		return "所有人可领"
	case ActCouponSendUserTypeSpecify:
		return "指定用户"
	default:
		return "未知类型"
	}
}

// ActCouponValidTimeType 有效时间
type ActCouponValidTimeType int

const (
	ActCouponValidTimeTypeFix      ActCouponValidTimeType = iota + 1 // 固定日期
	ActCouponValidTimeTypeXDay                                       // 领取当日开始计算有效期
	ActCouponValidTimeTypeXNextDay                                   // 领取次日开始计算有效期
)

func (em ActCouponValidTimeType) String() string {
	switch em {
	case ActCouponValidTimeTypeFix:
		return "固定日期"
	case ActCouponValidTimeTypeXDay:
		return "自领取当日起，%d天内有效"
	case ActCouponValidTimeTypeXNextDay:
		return "自领取次日起，%d天内有效"
	default:
		return "未知类型"
	}
}

// ActCouponUseRule 使用规则
type ActCouponUseRule int

const (
	ActCouponUseRuleAll             ActCouponUseRule = iota + 1 // 全部商品可用
	ActCouponUseRuleSpecifyGoods                                // 仅可用于指定商品
	ActCouponUseRuleSpecifyActivity                             // 可用于活动类型
)

func (em ActCouponUseRule) String() string {
	switch em {
	case ActCouponUseRuleAll:
		return "全部商品可用"
	case ActCouponUseRuleSpecifyGoods:
		return "仅可用于指定商品"
	case ActCouponUseRuleSpecifyActivity:
		return "可用于活动类型"
	default:
		return "未知类型"
	}
}

type ActCouponUseActivityType int

const (
	ActCouponUseActivityTypeForGroup ActCouponUseActivityType = iota + 1
	ActCouponUseActivityTypeForSecondKill
	ActCouponUseActivityTypeForBargain
)

func (em ActCouponUseActivityType) String() string {
	switch em {
	case ActCouponUseActivityTypeForGroup:
		return "拼团活动"
	case ActCouponUseActivityTypeForSecondKill:
		return "秒杀活动"
	case ActCouponUseActivityTypeForBargain:
		return "砍价活动"
	default:
		return "未知类型"
	}
}

type ActCouponSendState int

const (
	ActCouponSendStateUnProvide ActCouponSendState = iota + 1 // 未发放
	ActCouponSendStateProvide                                 // 已发放
	ActCouponSendStateProviding                               // 发放中
)

func (em ActCouponSendState) String() string {
	switch em {
	case ActCouponSendStateUnProvide:
		return "未发放"
	case ActCouponSendStateProvide:
		return "已发放"
	case ActCouponSendStateProviding:
		return "发放中"
	default:
		return "未知类型"
	}
}

type ActUserCouponUseState int

const (
	ActUserCouponUseStateUnUse   ActUserCouponUseState = iota // 未使用
	ActUserCouponUseStateUsed                                 // 已使用
	ActUserCouponUseStateUnValid                              // 失效
)

func (em ActUserCouponUseState) String() string {
	switch em {
	case ActUserCouponUseStateUnUse:
		return "未使用"
	case ActUserCouponUseStateUsed:
		return "已使用"
	case ActUserCouponUseStateUnValid:
		return "失效"
	default:
		return "未知类型"
	}
}
