Files
Backend-Api/CompanyManagment.App.Contracts/Employer/IEmployerApplication.cs

423 lines
11 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Transactions;
using _0_Framework.Application;
using _0_Framework.Application.Enums;
using CompanyManagment.App.Contracts.Checkout;
using CompanyManagment.App.Contracts.Employee;
using Microsoft.AspNetCore.Mvc;
namespace CompanyManagment.App.Contracts.Employer;
public interface IEmployerApplication
{
OperationResult Create(CreateEmployer command);
OperationResult Edit(EditEmployer command);
OperationResult EditEmployerNo(EditEmployer command);
OperationResult CreateLegals(CreateEmployer command);
OperationResult EditLegal(EditEmployer command);
EditEmployer GetDetails(long id);
OperationResult Active(long id);
OperationResult DeActive(long id);
OperationResult Remove_Old(long id);
List<EmployerViewModel> GetEmployers();
List<EmployerViewModel> Search(EmployerSearchModel searchModel);
List<EmprViewModel> GetEmployerByWorkshopId(long workshopId);
List<EmployerViewModel> GetEmployerByContracrtingPartyID(long id);
List<EmprViewModel> GetEmployerByEmployerIds(List<long> employerIds);
OperationResult CreateForClient(CreateEmployer command);
List<EmployerViewModel> SearchForClient(EmployerSearchModel searchModel);
List<EmployerViewModel> GetEmployersForClient(long acountID);
OperationResult CreateLegalsForClient(CreateEmployer command);
OperationResult EditForClient(EditEmployer command);
OperationResult EditLegalForClient(EditEmployer command);
#region Mahan
List<EmployerViewModel> GetEmployersHasWorkshop();
/// <summary>
/// لیست نام کارفرما ها برای جستجو
/// </summary>
/// <param name="search"></param>
/// <param name="id"></param>
/// <param name="legalType"></param>
/// <returns></returns>
Task<List<EmployerSelectListViewModel>> GetSelectList(string search, long id, LegalType? legalType = null);
#endregion
#region NewByHeydari
OperationResult DeleteEmployer(long id);
List<EmployerViewModel> GetEmployerWithFNameOrLName(string searchText);
List<EmployerViewModel> GetEmployerWithIdNumberOrRegisterId(string searchText);
List<EmployerViewModel> GetEmployerWithNationalcodeOrNationalId(string searchText);
OperationResult ActiveAll(long id);
List<EmployerViewModel> GetAllEmployers();
#endregion
#region Insurance
(string employerName, bool isLegal) InsuranceEmployerByWorkshopId(long workshopId);
#endregion
#region Api
/// <summary>
/// لیست کارفرما ها
/// </summary>
/// <returns></returns>
Task<List<GetEmployerListViewModel>> GetEmployerList(GetEmployerSearchModel searchModel);
/// <summary>
/// جزئیات کارفرما حقوقی
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Task<GetLegalEmployerDetailViewModel> GetLegalEmployerDetail(long id);
/// <summary>
/// جزئیات کارفرما حقیقی
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Task<GetRealEmployerDetailViewModel> GetRealEmployerDetail(long id);
/// <summary>
/// ایجاد کارفرمای حقیقی
/// </summary>
/// <param name="command"></param>
/// <returns></returns>
Task<OperationResult> CreateReal(CreateRealEmployer command);
/// <summary>
/// ایجاد کارفرمای حقوقی
/// </summary>
/// <param name="command"></param>
/// <returns></returns>
Task<OperationResult> CreateLegal(CreateLegalEmployer command);
/// <summary>
/// ویرایش کارفرمای حقیقی
/// </summary>
/// <param name="command"></param>
/// <returns></returns>
Task<OperationResult> EditReal(EditRealEmployer command);
/// <summary>
/// ویرایش کارفرمای حقوقی
/// </summary>
/// <param name="command"></param>
/// <returns></returns>
Task<OperationResult> EditLegal(EditLegalEmployer command);
/// <summary>
/// حذف کارفرما - درصورت داشتن کارگاه کارفرما غیرفعال میشود
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public Task<OperationResult<string>> Remove(long id);
#endregion
Task<OperationResult> CreateWorkflowRegistration(CreateEmployerWorkflowRegistration command);
/// <summary>
/// ویرایش کارفرما در گردش کار ثبت نام
/// </summary>
/// <param name="command"></param>
/// <returns></returns>
Task<OperationResult> EditWorkflowRegistration(EditEmployerWorkflowRegistration command);
/// <summary>
/// حذف کارفرما از گردش کار ثبت نام
/// </summary>
/// <param name="employerId">شناسه کارفرما</param>
/// <param name="institutionWorkshopDetailsId">شناسه جزئیات کارگاه موسسه</param>
/// <returns></returns>
Task<OperationResult> DeleteWorkflowRegistration(long employerId, long institutionWorkshopDetailsId);
Task<OperationResult<AuthenticateUserViewModel>> AuthenticateEmployer(string nationalCode, string dateOfBirth, string mobile);
Task<ActionResult<EditEmployerWorkflowRegistration>> GetWorkflowRegistrationForEdit(long employerId, long institutionWorkshopDetailsId);
}
public class AuthenticateUserViewModel
{
/// <summary>
/// نام
/// </summary>
public string FName { get; set; }
/// <summary>
/// نام خانوادگی
/// </summary>
public string LName { get; set; }
/// <summary>
/// نام پدر
/// </summary>
public string FatherName { get; set; }
/// <summary>
/// جنسیت
/// </summary>
public Gender Gender { get; set; }
/// <summary>
/// کد ملی
/// </summary>
public string NationalCode { get; set; }
public string DateOfBirth { get; set; }
/// <summary>
/// سری شناسنامه
/// </summary>
public string IdNumberSeri { get; set; }
/// <summary>
/// سریال شناسنامه
/// </summary>
public string IdNumberSerial { get; set; }
/// <summary>
/// شماره شناسنامه
/// </summary>
public string IdNumber { get; set; }
/// <summary>
/// شماره همراه
/// </summary>
public string Phone { get; set; }
}
/// <summary>
/// کلاس ثبت کارفرما در گردش کار - شامل اطلاعات کارفرمای حقیقی و حقوقی
/// </summary>
public class CreateEmployerWorkflowRegistration
{
/// <summary>
/// درزمانی که یوزر کارفرمایی رو انتخاب کرد که از قبل ثبت شده است
/// این فیلد باید مقدار داشته باشد
/// </summary>
public long EmployerId { get; set; }
/// <summary>
/// اطلاعات کارفرمای حقیقی
/// </summary>
public CreateRealEmployerWorkflowRegistration RealEmployer { get; set; }
/// <summary>
/// اطلاعات کارفرمای حقوقی
/// </summary>
public CreateLegalEmployerWorkflowRegistration LegalEmployer { get; set; }
/// <summary>
/// نوع حقوقی
/// </summary>
public LegalType LegalType { get; set; }
/// <summary>
/// شناسه جزئیات کارگاه موسسه
/// </summary>
public long InstitutionWorkshopInitialId { get; set; }
/// <summary>
/// شناسه قرارداد موسسه
/// </summary>
public long InstitutionContractId { get; set; }
/// <summary>
/// شناسه طرف قرارداد
/// </summary>
public long ContractingPartyId { get; set; }
}
/// <summary>
/// کلاس ثبت کارفرمای حقوقی در گردش کار - شامل اطلاعات شرکت و مدیرعامل
/// </summary>
public class CreateLegalEmployerWorkflowRegistration
{
/// <summary>
/// نام شرکت
/// </summary>
public string CompanyName { get; set; }
/// <summary>
/// شماره ثبت
/// </summary>
public string RegisterId { get; set; }
/// <summary>
/// شناسه ملی شرکت
/// </summary>
public string NationalId { get; set; }
/// <summary>
/// جنسیت
/// </summary>
public Gender Gender { get; set; }
/// <summary>
/// وضعیت احراز هویت
/// </summary>
public bool IsAuth { get; set; }
/// <summary>
/// کد ملی مدیرعامل
/// </summary>
public string CeoNationalCode { get; set; }
/// <summary>
/// شماره شناسنامه مدیرعامل
/// </summary>
public string CeoIdNumber { get; set; }
/// <summary>
/// نام مدیرعامل
/// </summary>
public string CeoFName { get; set; }
/// <summary>
/// نام خانوادگی مدیرعامل
/// </summary>
public string CeoLName { get; set; }
/// <summary>
/// نام پدر مدیرعامل
/// </summary>
public string CeoFatherName { get; set; }
/// <summary>
/// تاریخ تولد مدیرعامل
/// </summary>
public string CeoDateOfBirth { get; set; }
/// <summary>
/// محل صدور شناسنامه مدیرعامل
/// </summary>
public string CeoPlaceOfIssue { get; set; }
/// <summary>
/// تاریخ صدور شناسنامه مدیرعامل
/// </summary>
public string CeoDateOfIssue { get; set; }
/// <summary>
/// شماره موبایل
/// </summary>
public string PhoneNumber { get; set; }
/// <summary>
/// شماره تلفن ثابت
/// </summary>
public string TelephoneNumber { get; set; }
/// <summary>
/// اطلاعات سیستم دولتی
/// </summary>
public GovernmentSystemInfo GovernmentSystemInfo { get; set; }
public string IdNumberSeri { get; set; }
public string IdNumberSerial { get; set; }
}
/// <summary>
/// کلاس ثبت کارفرمای حقیقی در گردش کار - شامل اطلاعات شخصی کارفرما
/// </summary>
public class CreateRealEmployerWorkflowRegistration
{
/// <summary>
/// جنسیت
/// </summary>
public Gender Gender { get; set; }
/// <summary>
/// وضعیت احراز هویت
/// </summary>
public bool IsAuth { get; set; }
/// <summary>
/// کد ملی
/// </summary>
public string NationalCode { get; set; }
/// <summary>
/// شماره شناسنامه
/// </summary>
public string IdNumber { get; set; }
/// <summary>
/// نام
/// </summary>
public string FName { get; set; }
/// <summary>
/// نام خانوادگی
/// </summary>
public string LName { get; set; }
/// <summary>
/// نام پدر
/// </summary>
public string FatherName { get; set; }
/// <summary>
/// تاریخ تولد
/// </summary>
public string DateOfBirth { get; set; }
/// <summary>
/// شماره موبایل
/// </summary>
public string PhoneNumber { get; set; }
/// <summary>
/// محل صدور شناسنامه
/// </summary>
public string PlaceOfIssue { get; set; }
/// <summary>
/// تاریخ صدور شناسنامه
/// </summary>
public string DateOfIssue { get; set; }
/// <summary>
/// اطلاعات سیستم دولتی
/// </summary>
public GovernmentSystemInfo GovernmentSystemInfo { get; set; }
/// <summary>
/// شماره تلفن
/// </summary>
public string Telephone { get; set; }
public string IdNumberSeri { get; set; }
public string IdNumberSerial { get; set; }
}
/// <summary>
/// کلاس ویرایش کارفرما در گردش کار - شامل اطلاعات کارفرمای حقیقی و حقوقی
/// </summary>
public class EditEmployerWorkflowRegistration : CreateEmployerWorkflowRegistration
{
/// <summary>
/// شناسه کارفرما
/// </summary>
public long EmployerId { get; set; }
}