package models

type ObjectFilter struct {
    Search    string     `form:"search" json:"search"`
    Type      ObjectType `form:"type" json:"type"`
    City      string     `form:"city" json:"city"`
    MinPrice  float64    `form:"min_price" json:"min_price"`
    MaxPrice  float64    `form:"max_price" json:"max_price"`
    MinRating float64    `form:"min_rating" json:"min_rating"`
    Status    ObjectStatus `form:"status" json:"status"`
    OwnerID   uint       `form:"owner_id" json:"owner_id"`
    
    // Пагинация
    Page      int        `form:"page" json:"page" binding:"min=1"`
    PageSize  int        `form:"page_size" json:"page_size" binding:"min=1,max=100"`
    
    // Сортировка
    SortBy    string     `form:"sort_by" json:"sort_by"` // title, price, rating, city, created_at
    SortOrder string     `form:"sort_order" json:"sort_order"` // asc, desc
}

// PaginatedResponse - общий ответ с пагинацией
type PaginatedResponse struct {
    Data       interface{} `json:"data"`
    Total      int64       `json:"total"`
    Page       int         `json:"page"`
    PageSize   int         `json:"page_size"`
    TotalPages int         `json:"total_pages"`
}