package com.yfd.platform.utils.wrapper;

public enum SortDirection {
    // 升序
    ASC,
    // 降序
    DESC;

    public static SortDirection fromString(String direction) {
        try {
            return SortDirection.valueOf(direction.toUpperCase());
        } catch (IllegalArgumentException e) {
            // 默认升序
            return ASC;
        }
    }
}
