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-26 22:34:50 +01:00

18 lines
437 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) >= 1
}