From 132c8ac5a44ddd7b7c41877eb3592c489707e853 Mon Sep 17 00:00:00 2001 From: SamSys Date: Tue, 23 Dec 2025 15:10:17 +0330 Subject: [PATCH] init --- .../Leave/leaveListDto.cs | 84 +++++++++++++++++++ .../Repository/LeaveRepository.cs | 12 ++- 2 files changed, 94 insertions(+), 2 deletions(-) create mode 100644 CompanyManagment.App.Contracts/Leave/leaveListDto.cs diff --git a/CompanyManagment.App.Contracts/Leave/leaveListDto.cs b/CompanyManagment.App.Contracts/Leave/leaveListDto.cs new file mode 100644 index 00000000..aae584aa --- /dev/null +++ b/CompanyManagment.App.Contracts/Leave/leaveListDto.cs @@ -0,0 +1,84 @@ +namespace CompanyManagment.App.Contracts.Leave; + +public class leaveListDto +{ + + /// + /// نام کامل پرسنل + /// + public string EmployeeFullName { get; set; } + + + /// + /// سال مرخصی + /// + public string YearStr { get; set; } + + /// + /// ماه مرخصی + /// + public string MonthStr { get; set; } + + + /// + /// نوع مرخصی، استحقاقی/استعلاجی + /// + public string LeaveType { get; set; } + + + /// + /// تاریخ شروع مرخصی + /// + public string StartLeave { get; set; } + + /// + /// تاریخ پایان مرخصی + /// + public string EndLeave { get; set; } + + + /// + /// زمان مرخصی + /// باز مرخصی ساعتی + /// + public string HourlyInterval { get; set; } + + + /// + /// مدت مرخصی + /// + public string LeaveDuration { get; set; } + + /// + /// موافقت/عدم موافقت کارفرما + /// + public bool IsAccepted { get; set; } + + + + + + /// + /// آی دی + /// + public long Id { get; set; } + + + + /// + /// آی دی گارگاه + /// + public long WorkshopId { get; set; } + + /// + /// آی دی پرسنل + /// + public long EmployeeId { get; set; } + + + + /// + ///آیا فاقد اعتبار است. فاقد اعتبار ها فقط برای فیش های غیررسمی مورد استفاده قرار میگیرند + /// + public bool IsInvalid { get; private set; } +} \ No newline at end of file diff --git a/CompanyManagment.EFCore/Repository/LeaveRepository.cs b/CompanyManagment.EFCore/Repository/LeaveRepository.cs index 2c258abf..e76e682e 100644 --- a/CompanyManagment.EFCore/Repository/LeaveRepository.cs +++ b/CompanyManagment.EFCore/Repository/LeaveRepository.cs @@ -13,10 +13,11 @@ namespace CompanyManagment.EFCore.Repository; public class LeaveRepository : RepositoryBase, ILeaveRepository { private readonly CompanyContext _context; - - public LeaveRepository(CompanyContext context) : base(context) + private readonly long _workshopId; + public LeaveRepository(CompanyContext context, IAuthHelper authHelper) : base(context) { _context = context; + _workshopId = authHelper.GetWorkshopId(); } public EditLeave GetDetails(long id) @@ -536,4 +537,11 @@ public class LeaveRepository : RepositoryBase, ILeaveRepository (starContract >= x.StartLeaveGr && starContract <= x.EndLeaveGr) || (endContract >= x.StartLeaveGr && endContract <= x.EndLeaveGr)); } + + + #region ForApi + + + + #endregion } \ No newline at end of file