30 lines
877 B
Go
30 lines
877 B
Go
|
package genModel
|
||
|
|
||
|
import "github.com/zeromicro/go-zero/core/stores/sqlx"
|
||
|
|
||
|
var _ MerchantWechatModel = (*customMerchantWechatModel)(nil)
|
||
|
|
||
|
type (
|
||
|
// MerchantWechatModel is an interface to be customized, add more methods here,
|
||
|
// and implement the added methods in customMerchantWechatModel.
|
||
|
MerchantWechatModel interface {
|
||
|
merchantWechatModel
|
||
|
withSession(session sqlx.Session) MerchantWechatModel
|
||
|
}
|
||
|
|
||
|
customMerchantWechatModel struct {
|
||
|
*defaultMerchantWechatModel
|
||
|
}
|
||
|
)
|
||
|
|
||
|
// NewMerchantWechatModel returns a model for the database table.
|
||
|
func NewMerchantWechatModel(conn sqlx.SqlConn) MerchantWechatModel {
|
||
|
return &customMerchantWechatModel{
|
||
|
defaultMerchantWechatModel: newMerchantWechatModel(conn),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (m *customMerchantWechatModel) withSession(session sqlx.Session) MerchantWechatModel {
|
||
|
return NewMerchantWechatModel(sqlx.NewSqlConnFromSession(session))
|
||
|
}
|