Files
EdgeAPI/internal/db/models/user_plan_model_ext.go

9 lines
220 B
Go
Raw Permalink Normal View History

2021-10-29 14:02:40 +08:00
package models
2023-09-06 16:30:47 +08:00
import timeutil "github.com/iwind/TeaGo/utils/time"
// IsExpired 判断套餐是否过期
func (this *UserPlan) IsExpired() bool {
return len(this.DayTo) == 0 || this.DayTo < timeutil.Format("Y-m-d")
}