syntax = "proto3";

package wix.os.v1.upstream.wix.common;

import "wix/api/annotations.proto";
import "wix/api/validations.proto";
import "google/protobuf/struct.proto";

option java_multiple_files = true;
option java_package = "com.wixpress.os.v1.upstream.wix.common";

message Sorting {
    option (.wix.api.decomposite_of) = "wix.common.Sorting";
    option (.wix.api.decomposition_minimum_fields) = {
        field: "field_name"
        field: "order"
    };
    // Name of the field to sort by.
    string field_name = 1 [(.wix.api.maxLength) = 512];
    // Sort order.
    SortOrder order = 2;
}

enum SortOrder {
    ASC = 0;
    DESC = 1;
}