30 lines
856 B
Go
Executable File
30 lines
856 B
Go
Executable File
package model
|
|
|
|
import "github.com/zeromicro/go-zero/core/stores/sqlx"
|
|
|
|
var _ NhTouristBindModel = (*customNhTouristBindModel)(nil)
|
|
|
|
type (
|
|
// NhTouristBindModel is an interface to be customized, add more methods here,
|
|
// and implement the added methods in customNhTouristBindModel.
|
|
NhTouristBindModel interface {
|
|
nhTouristBindModel
|
|
withSession(session sqlx.Session) NhTouristBindModel
|
|
}
|
|
|
|
customNhTouristBindModel struct {
|
|
*defaultNhTouristBindModel
|
|
}
|
|
)
|
|
|
|
// NewNhTouristBindModel returns a model for the database table.
|
|
func NewNhTouristBindModel(conn sqlx.SqlConn) NhTouristBindModel {
|
|
return &customNhTouristBindModel{
|
|
defaultNhTouristBindModel: newNhTouristBindModel(conn),
|
|
}
|
|
}
|
|
|
|
func (m *customNhTouristBindModel) withSession(session sqlx.Session) NhTouristBindModel {
|
|
return NewNhTouristBindModel(sqlx.NewSqlConnFromSession(session))
|
|
}
|