package models

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

var _ TResourceSpecModel = (*customTResourceSpecModel)(nil)

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

	customTResourceSpecModel struct {
		*defaultTResourceSpecModel
	}
)

// NewTResourceSpecModel returns a model for the database table.
func NewTResourceSpecModel(conn sqlx.SqlConn) TResourceSpecModel {
	return &customTResourceSpecModel{
		defaultTResourceSpecModel: newTResourceSpecModel(conn),
	}
}

func (m *customTResourceSpecModel) withSession(session sqlx.Session) TResourceSpecModel {
	return NewTResourceSpecModel(sqlx.NewSqlConnFromSession(session))
}
