1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00
wakapi/models/customrule.go
2020-10-25 21:51:06 -04:00

19 lines
483 B
Go

package models
type CustomRule struct {
ID uint `json:"id" gorm:"primary_key"`
User *User `json:"-" gorm:"not null"`
UserID string `json:"-" gorm:"not null; index:idx_customrule_user"`
Extension string `json:"extension"`
Language string `json:"language"`
}
func validateLanguage(language string) bool {
return len(language) >= 1
}
func validateExtension(extension string) bool {
return len(extension) >= 2
}