package dto

import (
	"time"

	"quyun/v2/app/requests"
	"quyun/v2/pkg/consts"
)

// MyOrderListFilter defines query filters for listing current user's orders within a tenant.
type MyOrderListFilter struct {
	// Pagination controls paging parameters (page/limit).
	requests.Pagination `json:",inline" query:",inline"`
	// Status filters orders by order status.
	Status *consts.OrderStatus `json:"status,omitempty" query:"status"`
	// PaidAtFrom filters orders by paid_at >= this time.
	PaidAtFrom *time.Time `json:"paid_at_from,omitempty" query:"paid_at_from"`
	// PaidAtTo filters orders by paid_at <= this time.
	PaidAtTo *time.Time `json:"paid_at_to,omitempty" query:"paid_at_to"`
	// ContentID filters orders by purchased content id (via order_items join).
	ContentID *int64 `json:"content_id,omitempty" query:"content_id"`
}
