package models

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

var _ TClusterResourceModel = (*customTClusterResourceModel)(nil)

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

	customTClusterResourceModel struct {
		*defaultTClusterResourceModel
	}
)

// NewTClusterResourceModel returns a model for the database table.
func NewTClusterResourceModel(conn sqlx.SqlConn) TClusterResourceModel {
	return &customTClusterResourceModel{
		defaultTClusterResourceModel: newTClusterResourceModel(conn),
	}
}

func (m *customTClusterResourceModel) withSession(session sqlx.Session) TClusterResourceModel {
	return NewTClusterResourceModel(sqlx.NewSqlConnFromSession(session))
}
