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