using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using XYY.Core.Standard.Mvc;

namespace XYY.Api.Order.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class EnumsController : ApiControllerBase
    {
        [AllowAnonymous]
        public async Task<IActionResult> Get(string enumName)
        {
            var enumList = EnumsHelper.GetEnumItems(enumName);
            return Ok(enumList);
        }

        [AllowAnonymous]
        public async Task<IActionResult> GetDes(string enumName)
        {
            var enumList = EnumsHelper.GetEnumItemsDes(enumName);
            return Ok(enumList);
        }
    }
}
