30 lines
931 B
Go
Executable File
30 lines
931 B
Go
Executable File
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))
|
|
}
|