26 lines
853 B
Go
26 lines
853 B
Go
package repository
|
|
|
|
import (
|
|
"ssq-desk/internal/storage/models"
|
|
)
|
|
|
|
// SsqRepository 双色球数据仓库接口
|
|
type SsqRepository interface {
|
|
// FindAll 查询所有历史数据
|
|
FindAll() ([]models.SsqHistory, error)
|
|
// FindByIssue 根据期号查询
|
|
FindByIssue(issueNumber string) (*models.SsqHistory, error)
|
|
// FindByRedBalls 根据红球查询(支持部分匹配)
|
|
FindByRedBalls(redBalls []int) ([]models.SsqHistory, error)
|
|
// FindByRedAndBlue 根据红球和蓝球查询
|
|
FindByRedAndBlue(redBalls []int, blueBall int, blueBallRange []int) ([]models.SsqHistory, error)
|
|
// Create 创建记录
|
|
Create(history *models.SsqHistory) error
|
|
// BatchCreate 批量创建
|
|
BatchCreate(histories []models.SsqHistory) error
|
|
// GetLatestIssue 获取最新期号
|
|
GetLatestIssue() (string, error)
|
|
// Count 统计总数
|
|
Count() (int64, error)
|
|
}
|