transfer_middleware/genModel/serverOrderMarketModel.go

30 lines
931 B
Go
Raw Normal View History

2024-07-09 17:07:22 +08:00
package genModel
import "github.com/zeromicro/go-zero/core/stores/sqlx"
var _ ServerOrderMarketModel = (*customServerOrderMarketModel)(nil)
type (
// ServerOrderMarketModel is an interface to be customized, add more methods here,
// and implement the added methods in customServerOrderMarketModel.
ServerOrderMarketModel interface {
serverOrderMarketModel
withSession(session sqlx.Session) ServerOrderMarketModel
}
customServerOrderMarketModel struct {
*defaultServerOrderMarketModel
}
)
// NewServerOrderMarketModel returns a model for the database table.
func NewServerOrderMarketModel(conn sqlx.SqlConn) ServerOrderMarketModel {
return &customServerOrderMarketModel{
defaultServerOrderMarketModel: newServerOrderMarketModel(conn),
}
}
func (m *customServerOrderMarketModel) withSession(session sqlx.Session) ServerOrderMarketModel {
return NewServerOrderMarketModel(sqlx.NewSqlConnFromSession(session))
}