using _0_Framework.Application; using CompanyManagment.App.Contracts.AdminMonthlyOverview; using CompanyManagment.App.Contracts.Employer; using CompanyManagment.App.Contracts.InstitutionContract; using CompanyManagment.App.Contracts.TemporaryClientRegistration; using CompanyManagment.App.Contracts.Workshop; using Microsoft.AspNetCore.Mvc; using ServiceHost.BaseControllers; namespace ServiceHost.Areas.Admin.Controllers { public class RegistrationWorkflowController : AdminBaseController { private readonly ITemporaryClientRegistrationApplication _temporaryClientRegistrationApplication; private readonly IInstitutionContractApplication _institutionContractApplication; private readonly IEmployerApplication _employerApplication; private readonly IWorkshopApplication _workshopApplication; public RegistrationWorkflowController(ITemporaryClientRegistrationApplication temporaryClientRegistrationApplication, IInstitutionContractApplication institutionContractApplication, IEmployerApplication employerApplication, IWorkshopApplication workshopApplication) { _temporaryClientRegistrationApplication = temporaryClientRegistrationApplication; _institutionContractApplication = institutionContractApplication; _employerApplication = employerApplication; _workshopApplication = workshopApplication; } /// /// لیست کارپوشه ثبت نام /// /// [HttpGet] public async Task>> GetList() { var result = await _institutionContractApplication.RegistrationWorkflowMainList(); return result; } [HttpGet("items/{institutionContractId}")] public async Task>> RegistrationWorkflowItems( long institutionContractId) { var result = await _institutionContractApplication.RegistrationWorkflowItems(institutionContractId); return result; } [HttpPost("create-employer")] public async Task> CreateEmployerForWorkshopDetails([FromBody]CreateEmployerWorkflowRegistration command) { var result = await _employerApplication.CreateWorkflowRegistration(command); return result; } [HttpPost("create-workshop")] public async Task> CreateWorkshop( [FromBody]CreateWorkshopWorkflowRegistration command) { var result = await _workshopApplication.CreateWorkshopWorkflowRegistration(command); return result; } [HttpPost("auth-employer")] public async Task>> AuthenticateEmployer(AuthenticateEmployerWorkflowRequest command) { var result = await _employerApplication.AuthenticateEmployer(command.NationalCode, command.DateOfBirth, command.Mobile); return result; } } public class AuthenticateEmployerWorkflowRequest { public string NationalCode { get; set; } public string DateOfBirth { get; set; } public string Mobile { get; set; } } }