package models

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

var _ AiDeployInstanceTaskModel = (*customAiDeployInstanceTaskModel)(nil)

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

	customAiDeployInstanceTaskModel struct {
		*defaultAiDeployInstanceTaskModel
	}
)

// NewAiDeployInstanceTaskModel returns a model for the database table.
func NewAiDeployInstanceTaskModel(conn sqlx.SqlConn) AiDeployInstanceTaskModel {
	return &customAiDeployInstanceTaskModel{
		defaultAiDeployInstanceTaskModel: newAiDeployInstanceTaskModel(conn),
	}
}

func (m *customAiDeployInstanceTaskModel) withSession(session sqlx.Session) AiDeployInstanceTaskModel {
	return NewAiDeployInstanceTaskModel(sqlx.NewSqlConnFromSession(session))
}
