pcm-coordinator/pkg/models/tadapterinfomodel.go

30 lines
839 B
Go

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