package com.liangjian.dataplatform.member.util.dynamic;

import org.springframework.data.domain.Sort;

/**
 * Created by huangziqi on 2019/12/17
 */
public enum SortDirection {
    ASC {
        @Override
        public Sort.Direction toJpaPageSort() {
            return Sort.Direction.ASC;
        }
    },DESC {
        @Override
        public Sort.Direction toJpaPageSort() {
            return Sort.Direction.DESC;
        }
    };

    public abstract Sort.Direction toJpaPageSort();
}
