package model

import (
	"context"
	"yx-dataset-server/app/schema"
)

// IDataset Dataset存储接口
type IDataset interface {
	// 查询数据
	Query(ctx context.Context, params schema.DatasetQueryParam, opts ...schema.DatasetQueryOptions) (*schema.DatasetQueryResult, error)
	// 查询指定数据
	Get(ctx context.Context, recordID string, opts ...schema.DatasetQueryOptions) (*schema.Dataset, error)
	// 创建数据
	Create(ctx context.Context, item schema.Dataset) error
	// 更新数据
	Update(ctx context.Context, recordID string, item schema.Dataset) error
	// 删除数据
	Delete(ctx context.Context, recordID string) error
	// DeleteByOrgId 删除数据
	DeleteByOrgId(ctx context.Context, orgId string) error
	// 更新状态
	UpdateStatus(ctx context.Context, recordID string, status int) error
	//// UpdateSequence 更新排序
	//UpdateSequence(ctx context.Context, recordID string, sequence int) error
	//// UpdateBatchSequenceMinus 批量排序-1
	//UpdateBatchSequenceMinus(ctx context.Context, oldSequence, sequence int) error
	//// GetMaxSequence 查询最大排序值
	//GetMaxSequence(ctx context.Context) (int, error)
}
