service.go 491 B

123456789101112131415161718192021222324252627
  1. package history
  2. import (
  3. "go-common/app/interface/main/tv/conf"
  4. "go-common/app/interface/main/tv/dao/archive"
  5. "go-common/app/interface/main/tv/dao/cms"
  6. "go-common/app/interface/main/tv/dao/history"
  7. )
  8. // Service .
  9. type Service struct {
  10. conf *conf.Config
  11. dao *history.Dao
  12. cmsDao *cms.Dao
  13. arcDao *archive.Dao
  14. }
  15. // New .
  16. func New(c *conf.Config) *Service {
  17. srv := &Service{
  18. conf: c,
  19. dao: history.New(c),
  20. cmsDao: cms.New(c),
  21. arcDao: archive.New(c),
  22. }
  23. return srv
  24. }