main.go 700 B

123456789101112131415161718192021222324252627282930313233343536
  1. package main
  2. import (
  3. "git.sxidc.com/go-tools/utils/strutils"
  4. "git.sxidc.com/service-supports/fserr"
  5. )
  6. type Configuration struct {
  7. Group string `sqlmapping:"column:group;key;notUpdate;" sqlresult:"column:group;"`
  8. Value string `sqlmapping:"column:value;notUpdate;" sqlresult:"column:value;"`
  9. }
  10. func (e *Configuration) DomainCNName() string {
  11. return "配置"
  12. }
  13. func (e *Configuration) CheckKeyFields() error {
  14. if strutils.IsStringEmpty(e.Group) {
  15. return fserr.New("没有传递配置组")
  16. }
  17. return nil
  18. }
  19. type ConfigurationInfo struct {
  20. Group string `sqlresult:"column:group;"`
  21. Value string `sqlresult:"column:value;"`
  22. }
  23. const (
  24. tableName = "test.configurations"
  25. )
  26. func main() {
  27. }