1.4.5.2
This commit is contained in:
8
EdgeAPI/internal/db/models/user_plan_model_ext.go
Normal file
8
EdgeAPI/internal/db/models/user_plan_model_ext.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package models
|
||||
|
||||
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")
|
||||
}
|
||||
Reference in New Issue
Block a user