entity.go 1015 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package permission_group
  2. import (
  3. "git.sxidc.com/go-framework/baize/framework/core/domain"
  4. "git.sxidc.com/go-framework/baize/framework/core/domain/entity"
  5. )
  6. const (
  7. FieldName = "Name"
  8. FieldDescription = "Description"
  9. )
  10. var (
  11. ColumnName = domain.ColumnName(FieldName)
  12. ColumnDescription = domain.ColumnName(FieldDescription)
  13. )
  14. var fieldMap = map[string]string{
  15. FieldName: "权限组名称",
  16. FieldDescription: "权限组描述",
  17. }
  18. type Entity struct {
  19. entity.Base
  20. Name string `sqlmapping:"column:name" sqlresult:"column:name" check:"required,lte=256,when=create/update"`
  21. Description string `sqlmapping:"column:description;updateClear" sqlresult:"column:description"`
  22. PermissionIDs []string `sqlmapping:"-" sqlresult:"-"`
  23. entity.UserIDFields
  24. entity.TimeFields
  25. }
  26. func (e *Entity) DomainCNName() string {
  27. return "权限组"
  28. }
  29. func (e *Entity) DomainCamelName() string {
  30. return "PermissionGroup"
  31. }
  32. func (e *Entity) GetFieldMap() map[string]string {
  33. return fieldMap
  34. }