entity.go 546 B

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