package models

import "github.com/zeromicro/go-zero/core/stores/sqlx"

var _ TBaseResourceSpecModel = (*customTBaseResourceSpecModel)(nil)

type (
	// TBaseResourceSpecModel is an interface to be customized, add more methods here,
	// and implement the added methods in customTBaseResourceSpecModel.
	TBaseResourceSpecModel interface {
		tBaseResourceSpecModel
		withSession(session sqlx.Session) TBaseResourceSpecModel
	}

	customTBaseResourceSpecModel struct {
		*defaultTBaseResourceSpecModel
	}
)

// NewTBaseResourceSpecModel returns a model for the database table.
func NewTBaseResourceSpecModel(conn sqlx.SqlConn) TBaseResourceSpecModel {
	return &customTBaseResourceSpecModel{
		defaultTBaseResourceSpecModel: newTBaseResourceSpecModel(conn),
	}
}

func (m *customTBaseResourceSpecModel) withSession(session sqlx.Session) TBaseResourceSpecModel {
	return NewTBaseResourceSpecModel(sqlx.NewSqlConnFromSession(session))
}
