package contract import ( "time" "github.com/google/uuid" ) type CreateCustomerPointsRequest struct { CustomerID uuid.UUID `json:"customer_id" validate:"required"` Balance int64 `json:"balance" validate:"min=0"` } type UpdateCustomerPointsRequest struct { Balance int64 `json:"balance" validate:"min=0"` } type AddCustomerPointsRequest struct { Points int64 `json:"points" validate:"required,min=1"` } type DeductCustomerPointsRequest struct { Points int64 `json:"points" validate:"required,min=1"` } type CustomerPointsResponse struct { ID uuid.UUID `json:"id"` CustomerID uuid.UUID `json:"customer_id"` Balance int64 `json:"balance"` Customer *CustomerResponse `json:"customer,omitempty"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` } type ListCustomerPointsRequest struct { Page int `json:"page" validate:"min=1"` Limit int `json:"limit" validate:"min=1,max=100"` Search string `json:"search"` SortBy string `json:"sort_by" validate:"omitempty,oneof=balance created_at updated_at"` SortOrder string `json:"sort_order" validate:"omitempty,oneof=asc desc"` } type PaginatedCustomerPointsResponse struct { Data []CustomerPointsResponse `json:"data"` TotalCount int `json:"total_count"` Page int `json:"page"` Limit int `json:"limit"` TotalPages int `json:"total_pages"` }