using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using MS.Models.ViewModel;
using MS.Services.PosTrxService;
using MS.Services.SQLite;
using MS.WebCore.Core;
using System.Threading.Tasks;

namespace MS.WebApi.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class RegisterMemberGroupinMiniProgramController : ControllerBase
    {
        private readonly IBuidMembershipGroupService _IBuidMembershipGroupService;
        public RegisterMemberGroupinMiniProgramController(IBuidMembershipGroupService buidMembershipGroupService)
        {
            _IBuidMembershipGroupService = buidMembershipGroupService;
        }
        [Route("CreateAsync")]
        [EnableCors("AllowSpecificOrigin")]
        [HttpPost]
        public async Task<ExecuteResult> CreateAsync(BuidMembershipGroupViewModel viewModel)
        {
            return await _IBuidMembershipGroupService.CreateAsync(viewModel);
        }
    }
}
