base_db.go 417 B

1234567891011121314151617181920212223242526272829
  1. package models
  2. import (
  3. "eta/eta_mini_ht_api/common/component/database"
  4. "gorm.io/gorm"
  5. )
  6. type Order string
  7. const (
  8. Desc Order = "desc"
  9. Asc Order = "asc"
  10. )
  11. func Main() *gorm.DB {
  12. return database.Select(database.MAIN)
  13. }
  14. func EMAS() *gorm.DB {
  15. return database.Select(database.EMAS)
  16. }
  17. func ETA() *gorm.DB {
  18. return database.Select(database.ETA)
  19. }
  20. func HT() *gorm.DB {
  21. return database.Select(database.GL)
  22. }