sip_user.go 755 B

123456789101112131415161718192021222324252627
  1. //go:generate develvoip_generateCommon
  2. //go:generate reform --gofmt=false
  3. package local_pbx
  4. import (
  5. "github.com/revel/revel"
  6. )
  7. //generateCommon:modelFunctions
  8. //reformOptions:imitateGorm
  9. //reform:pbx.sip_users_dynamic
  10. type SipUser struct {
  11. Id int `json:",omitempty" gorm:"primary_key"`
  12. ItemCommon `reform:",embedded:item_common.go" gorm:"embedded:embedded;file:item_common.go"`
  13. Name string `json:",omitempty" sql:"unique_index"`
  14. Secret string `json:",omitempty" generate:"password" randomChars:"0123456789abcdefghijklmnoprstuvwxyzABCDEFGHIJKLMNOPRSTUVWXYZ" randomLen:"12"`
  15. //Context string `reform:"context"`
  16. }
  17. func (item SipUser) KeyIsEqualsTo(compareToI interface{}) bool {
  18. revel.ERROR.Fatalf("Wrong method for SipUser")
  19. return false
  20. }