entity.go 722 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package identity
  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. )
  9. var (
  10. ColumnName = domain.ColumnName(FieldName)
  11. )
  12. var fieldMap = map[string]string{
  13. FieldName: "身份名称",
  14. }
  15. type Entity struct {
  16. entity.Base
  17. Name string `sqlmapping:"column:name" sqlresult:"column:name" check:"required,lte=128,when=create/update"`
  18. StudentIDs []string `sqlmapping:"-" sqlresult:"-"`
  19. entity.TimeFields
  20. }
  21. func (e *Entity) DomainCNName() string {
  22. return "身份"
  23. }
  24. func (e *Entity) DomainCamelName() string {
  25. return "Identity"
  26. }
  27. func (e *Entity) GetFieldMap() map[string]string {
  28. return fieldMap
  29. }