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

18 lines
437 B
Go
Raw Normal View History

2020-10-25 09:22:10 +03:00
package models
type CustomRule struct {
2020-10-27 00:34:50 +03:00
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"`
2020-10-25 09:22:10 +03:00
}
func validateLanguage(language string) bool {
return len(language) >= 1
}
func validateExtension(extension string) bool {
2020-10-26 07:27:07 +03:00
return len(extension) >= 1
2020-10-25 09:22:10 +03:00
}