Added the OrganizationService and IOrganizationService
This commit is contained in:
parent
e657f91d4b
commit
7928c6ca36
@ -203,6 +203,8 @@ namespace Marco.Pms.DataAccess.Data
|
|||||||
public DbSet<TenantOrgMapping> TenantOrgMappings { get; set; }
|
public DbSet<TenantOrgMapping> TenantOrgMappings { get; set; }
|
||||||
public DbSet<OrgServiceMapping> OrgServiceMappings { get; set; }
|
public DbSet<OrgServiceMapping> OrgServiceMappings { get; set; }
|
||||||
public DbSet<ProjectOrgMapping> ProjectOrgMappings { get; set; }
|
public DbSet<ProjectOrgMapping> ProjectOrgMappings { get; set; }
|
||||||
|
public DbSet<OrganizationHierarchy> OrganizationHierarchies { get; set; }
|
||||||
|
public DbSet<OrgHierarchyLog> OrgHierarchyLogs { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
29
Marco.Pms.Model/OrganizationModel/OrgHierarchyLog.cs
Normal file
29
Marco.Pms.Model/OrganizationModel/OrgHierarchyLog.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
using Marco.Pms.Model.Employees;
|
||||||
|
using Marco.Pms.Model.Utilities;
|
||||||
|
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
|
namespace Marco.Pms.Model.OrganizationModel
|
||||||
|
{
|
||||||
|
public class OrgHierarchyLog : TenantRelation
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public Guid OrganizationHierarchyId { get; set; }
|
||||||
|
|
||||||
|
[ValidateNever]
|
||||||
|
[ForeignKey("OrganizationHierarchyId")]
|
||||||
|
public OrganizationHierarchy? OrganizationHierarchy { get; set; }
|
||||||
|
public DateTime AssignedAt { get; set; }
|
||||||
|
public Guid AssignedById { get; set; }
|
||||||
|
|
||||||
|
[ValidateNever]
|
||||||
|
[ForeignKey("AssignedById")]
|
||||||
|
public Employee? AssignedBy { get; set; }
|
||||||
|
public DateTime? ReAssignedAt { get; set; }
|
||||||
|
public Guid? ReAssignedById { get; set; }
|
||||||
|
|
||||||
|
[ValidateNever]
|
||||||
|
[ForeignKey("ReAssignedById")]
|
||||||
|
public Employee? ReAssignedBy { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
30
Marco.Pms.Model/OrganizationModel/OrganizationHierarchy.cs
Normal file
30
Marco.Pms.Model/OrganizationModel/OrganizationHierarchy.cs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
using Marco.Pms.Model.Employees;
|
||||||
|
using Marco.Pms.Model.Utilities;
|
||||||
|
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
|
namespace Marco.Pms.Model.OrganizationModel
|
||||||
|
{
|
||||||
|
public class OrganizationHierarchy : TenantRelation
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public Guid EmployeeId { get; set; }
|
||||||
|
|
||||||
|
[ValidateNever]
|
||||||
|
[ForeignKey("EmployeeId")]
|
||||||
|
public Employee? Employee { get; set; }
|
||||||
|
public Guid ReportToId { get; set; }
|
||||||
|
|
||||||
|
[ValidateNever]
|
||||||
|
[ForeignKey("ReportToId")]
|
||||||
|
public Employee? ReportTo { get; set; }
|
||||||
|
public bool IsPrimary { get; set; }
|
||||||
|
public bool IsActive { get; set; }
|
||||||
|
public DateTime AssignedAt { get; set; }
|
||||||
|
public Guid AssignedById { get; set; }
|
||||||
|
|
||||||
|
[ValidateNever]
|
||||||
|
[ForeignKey("AssignedById")]
|
||||||
|
public Employee? AssignedBy { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@ -185,6 +185,7 @@ builder.Services.AddScoped<IDirectoryService, DirectoryService>();
|
|||||||
builder.Services.AddScoped<IFirebaseService, FirebaseService>();
|
builder.Services.AddScoped<IFirebaseService, FirebaseService>();
|
||||||
builder.Services.AddScoped<IRazorpayService, RazorpayService>();
|
builder.Services.AddScoped<IRazorpayService, RazorpayService>();
|
||||||
builder.Services.AddScoped<IAesEncryption, AesEncryption>();
|
builder.Services.AddScoped<IAesEncryption, AesEncryption>();
|
||||||
|
builder.Services.AddScoped<IOrganizationService, OrganizationService>();
|
||||||
builder.Services.AddScoped<ITenantService, TenantService>();
|
builder.Services.AddScoped<ITenantService, TenantService>();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
1002
Marco.Pms.Services/Service/OrganizationService.cs
Normal file
1002
Marco.Pms.Services/Service/OrganizationService.cs
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,28 @@
|
|||||||
|
using Marco.Pms.Model.Dtos.Organization;
|
||||||
|
using Marco.Pms.Model.Employees;
|
||||||
|
using Marco.Pms.Model.Utilities;
|
||||||
|
|
||||||
|
namespace Marco.Pms.Services.Service.ServiceInterfaces
|
||||||
|
{
|
||||||
|
public interface IOrganizationService
|
||||||
|
{
|
||||||
|
#region =================================================================== Get Functions ===================================================================
|
||||||
|
Task<ApiResponse<object>> GetOrganizarionListAsync(string? searchString, double? sprid, bool active, int pageNumber, int pageSize, Employee loggedInEmployee, Guid tenantId, Guid loggedOrganizationId);
|
||||||
|
Task<ApiResponse<object>> GetOrganizationDetailsAsync(Guid id, Employee loggedInEmployee, Guid tenantId, Guid loggedOrganizationId);
|
||||||
|
Task<ApiResponse<object>> GetOrganizationHierarchyListAsync(Guid employeeId, Employee loggedInEmployee, Guid tenantId, Guid loggedOrganizationId);
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region =================================================================== Post Functions ===================================================================
|
||||||
|
Task<ApiResponse<object>> CreateOrganizationAsync(CreateOrganizationDto model, Employee loggedInEmployee, Guid tenantId, Guid loggedOrganizationId);
|
||||||
|
Task<ApiResponse<object>> AssignOrganizationToProjectAsync(AssignOrganizationDto model, Employee loggedInEmployee, Guid tenantId, Guid loggedOrganizationId);
|
||||||
|
Task<ApiResponse<object>> AssignOrganizationToTenantAsync(Guid organizationId, Employee loggedInEmployee, Guid tenantId, Guid loggedOrganizationId);
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region =================================================================== Put Functions ===================================================================
|
||||||
|
Task<ApiResponse<object>> UpdateOrganiationAsync(Guid id, UpdateOrganizationDto model, Employee loggedInEmployee, Guid tenantId, Guid loggedOrganizationId);
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region =================================================================== Delete Functions ===================================================================
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user