You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
391 B
27 lines
391 B
package dao |
|
|
|
import ( |
|
"context" |
|
|
|
"go-common/app/interface/main/upload/conf" |
|
"go-common/library/database/orm" |
|
|
|
"github.com/jinzhu/gorm" |
|
) |
|
|
|
// Dao dao struct |
|
type Dao struct { |
|
orm *gorm.DB |
|
} |
|
|
|
// NewDao new a dao instance. |
|
func NewDao(c *conf.Config) *Dao { |
|
return &Dao{ |
|
orm: orm.NewMySQL(c.ORM), |
|
} |
|
} |
|
|
|
// Ping ping database. |
|
func (d *Dao) Ping(c context.Context) error { |
|
return nil |
|
}
|
|
|