This commit is contained in:
2026-04-21 22:36:48 +08:00
commit 488c695fdf
748 changed files with 266838 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
package repositories
import (
"context"
"time"
"hyapi-server/internal/domains/finance/entities"
)
// InvoiceApplicationRepository 发票申请仓储接口
type InvoiceApplicationRepository interface {
Create(ctx context.Context, application *entities.InvoiceApplication) error
Update(ctx context.Context, application *entities.InvoiceApplication) error
Save(ctx context.Context, application *entities.InvoiceApplication) error
FindByID(ctx context.Context, id string) (*entities.InvoiceApplication, error)
FindByUserID(ctx context.Context, userID string, page, pageSize int) ([]*entities.InvoiceApplication, int64, error)
FindPendingApplications(ctx context.Context, page, pageSize int) ([]*entities.InvoiceApplication, int64, error)
FindByStatus(ctx context.Context, status entities.ApplicationStatus) ([]*entities.InvoiceApplication, error)
FindByUserIDAndStatus(ctx context.Context, userID string, status entities.ApplicationStatus, page, pageSize int) ([]*entities.InvoiceApplication, int64, error)
FindByUserIDAndStatusWithTimeRange(ctx context.Context, userID string, status entities.ApplicationStatus, startTime, endTime *time.Time, page, pageSize int) ([]*entities.InvoiceApplication, int64, error)
FindByStatusWithTimeRange(ctx context.Context, status entities.ApplicationStatus, startTime, endTime *time.Time, page, pageSize int) ([]*entities.InvoiceApplication, int64, error)
FindAllWithTimeRange(ctx context.Context, startTime, endTime *time.Time, page, pageSize int) ([]*entities.InvoiceApplication, int64, error)
GetUserTotalInvoicedAmount(ctx context.Context, userID string) (string, error)
GetUserTotalAppliedAmount(ctx context.Context, userID string) (string, error)
}