dao.go 313 B

123456789101112131415161718192021
  1. package manager
  2. import (
  3. "go-common/app/job/main/videoup/conf"
  4. xsql "go-common/library/database/sql"
  5. )
  6. // Dao is manager dao.
  7. type Dao struct {
  8. c *conf.Config
  9. db *xsql.DB
  10. }
  11. // New new a manager dao.
  12. func New(c *conf.Config) (d *Dao) {
  13. d = &Dao{
  14. c: c,
  15. db: xsql.NewMySQL(c.DB.Manager),
  16. }
  17. return d
  18. }