v1.0.0
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package repositories
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"tyapi-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)
|
||||
}
|
||||
Reference in New Issue
Block a user