MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / validateSecondKillEventInput

Function validateSecondKillEventInput

internal/service/lotteryDraw.go:615–623  ·  view source on GitHub ↗

validateSecondKillEventInput 验证创建秒杀活动的输入

(input domain.SecondKillEvent)

Source from the content-addressed store, hash-verified

613
614// validateSecondKillEventInput 验证创建秒杀活动的输入
615func validateSecondKillEventInput(input domain.SecondKillEvent) error {
616 if input.Name == "" {
617 return errors.New("秒杀活动名称不能为空")
618 }
619 if input.StartTime >= input.EndTime {
620 return errors.New("无效的秒杀活动时间范围")
621 }
622 return nil
623}

Callers 1

CreateSecondKillEventMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected