base.go 474 B

123456789101112131415161718192021222324
  1. package entity
  2. import "git.sxidc.com/go-tools/utils/strutils"
  3. type Base struct {
  4. ID string `sqlmapping:"column:id;key;" sqlresult:"column:id;"`
  5. }
  6. func (e *Base) DomainCNName() string {
  7. panic("领域实体没有实现DomainCNName接口")
  8. }
  9. func (e *Base) DomainCamelName() string {
  10. panic("领域实体没有实现DomainCamelName接口")
  11. }
  12. func (e *Base) GenerateID() error {
  13. e.ID = strutils.SimpleUUID()
  14. return nil
  15. }
  16. func (e *Base) GetID() string {
  17. return e.ID
  18. }