package consts import "gorm.io/gorm" const Logo = ` ____ _____ / __ \ |_ _| | | | |_ __ ___ _ __ | | ___ __ _ _ __ ___ | | | | '_ \ / _ \ '_ \ | | / _ \/ _' | '_ ' _ \ | |__| | |_) | __/ | | | | || __/ (_| | | | | | | \____/| .__/ \___|_| |_| \_/ \___|\__,_|_| |_| |_| | | |_| https://github.com/mirrors2/openteam --------------------------------------------------- ` const SecretKey = "openteam" const Day = 24 * 60 * 60 // day := 86400 type UserRole int const ( RoleUser UserRole = iota * 10 RoleAdmin RoleRoot ) const ( StatusDisabled = iota StatusEnabled StatusExpired // 过期 StatusExhausted // 耗尽 StatusDeleted = -1 ) const ( Limited = iota Unlimited UnlimitedQuota = 999999 ) var ( ErrUserNotFound = gorm.ErrRecordNotFound ) func OpenOrClose(status bool) int { if status { return StatusEnabled } return StatusDisabled } // type DBType int // const ( // DBTypeMySQL DBType = iota // DBTypePostgreSQL // DBTypeSQLite // )