transfer_rs/genModel/serverOrderModel.go

30 lines
823 B
Go
Executable File

package genModel
import "github.com/zeromicro/go-zero/core/stores/sqlx"
var _ ServerOrderModel = (*customServerOrderModel)(nil)
type (
// ServerOrderModel is an interface to be customized, add more methods here,
// and implement the added methods in customServerOrderModel.
ServerOrderModel interface {
serverOrderModel
withSession(session sqlx.Session) ServerOrderModel
}
customServerOrderModel struct {
*defaultServerOrderModel
}
)
// NewServerOrderModel returns a model for the database table.
func NewServerOrderModel(conn sqlx.SqlConn) ServerOrderModel {
return &customServerOrderModel{
defaultServerOrderModel: newServerOrderModel(conn),
}
}
func (m *customServerOrderModel) withSession(session sqlx.Session) ServerOrderModel {
return NewServerOrderModel(sqlx.NewSqlConnFromSession(session))
}