using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using YBDevice.Application.OfficeialInfo;

namespace YBDevice.NWeb.Pages.MiniProgram
{
    public class CustomServiceModel : BaseModel
    {
        public CustomServiceC2SDto data = new CustomServiceC2SDto();
        private readonly OfficialService _officialService;
        public int mid = 0;
        public CustomServiceModel(OfficialService officialService)
        {
            _officialService = officialService;
        }

        public async Task OnGet(int id)
        {
            var result = await _officialService.GetCustomServiceAsync(id);
            if (result != null)
            {
                data = result;
            }
            mid = id;
        }
    }
}
