Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
akbaramd committed Nov 14, 2024
1 parent 4967c32 commit bda7548
Show file tree
Hide file tree
Showing 124 changed files with 882 additions and 663 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using Bonyan.Layer.Domain.ValueObjects;

namespace Nezam.Modular.ESS.Identity.Domain.Shared.Employer;

public class EmployerId : BonBusinessId<EmployerId>
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using Bonyan.Layer.Domain.ValueObjects;

namespace Nezam.Modular.ESS.Identity.Domain.Shared.Engineer;

public class EngineerId : BonBusinessId<EngineerId>
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>Nezam.Modular.ESS.Identity.Domain.Shared</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Bonyan.Layer.Domain" Version="1.1.7" />
<PackageReference Include="Bonyan.UserManagement.Domain" Version="1.1.7" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Nezam.Modular.ESS.Identity.Domain.Shared.Roles;

public static class RoleConst
{
public const string EmployerTitle = "Employer";
public static readonly RoleId EmployerRoleId = new RoleId("employer");

public const string EngineerTitle = "Engineer";
public static readonly RoleId EngineerRoleId = new RoleId("enginer");
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using Bonyan.Layer.Domain.ValueObjects;

namespace Nezam.Modular.ESS.Identity.Domain.Shared.Roles
{
public class RoleId : BonValueObject
{
public RoleId(string name)
{
Name = name ?? throw new ArgumentNullException(nameof(name));
}

public string Name { get; private set; }

protected override IEnumerable<object?> GetEqualityComponents()
{
yield return Name;
}

public override string ToString()
{
return Name;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Bonyan.Layer.Domain.Events;
using Bonyan.UserManagement.Domain.ValueObjects;

namespace Nezam.Modular.ESS.IdEntity.Domain.User.Events;
namespace Nezam.Modular.ESS.Identity.Domain.Shared.User.Events;

public class ContactInfoUpdatedEvent : BonDomainEventBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Bonyan.Layer.Domain.Events;
using Bonyan.UserManagement.Domain.ValueObjects;
using Nezam.Modular.ESS.IdEntity.Domain.Employer;
using Nezam.Modular.ESS.Identity.Domain.Shared.Employer;

namespace Nezam.Modular.ESS.IdEntity.Domain.User.Events;
namespace Nezam.Modular.ESS.Identity.Domain.Shared.User.Events;

public class EmployerAssignedOrUpdatedEvent : BonDomainEventBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Bonyan.Layer.Domain.Events;
using Bonyan.UserManagement.Domain.ValueObjects;
using Nezam.Modular.ESS.IdEntity.Domain.Employer;
using Nezam.Modular.ESS.Identity.Domain.Shared.Employer;

namespace Nezam.Modular.ESS.IdEntity.Domain.User.Events;
namespace Nezam.Modular.ESS.Identity.Domain.Shared.User.Events;

public class EmployerRemovedEvent : BonDomainEventBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Bonyan.Layer.Domain.Events;
using Bonyan.UserManagement.Domain.ValueObjects;
using Nezam.Modular.ESS.IdEntity.Domain.Engineer;
using Nezam.Modular.ESS.Identity.Domain.Shared.Engineer;

namespace Nezam.Modular.ESS.IdEntity.Domain.User.Events;
namespace Nezam.Modular.ESS.Identity.Domain.Shared.User.Events;

public class EngineerAssignedOrUpdatedEvent : BonDomainEventBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Bonyan.Layer.Domain.Events;
using Bonyan.UserManagement.Domain.ValueObjects;
using Nezam.Modular.ESS.IdEntity.Domain.Engineer;
using Nezam.Modular.ESS.Identity.Domain.Shared.Engineer;

namespace Nezam.Modular.ESS.IdEntity.Domain.User.Events;
namespace Nezam.Modular.ESS.Identity.Domain.Shared.User.Events;

public class EngineerRemovedEvent : BonDomainEventBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
using Bonyan.Layer.Domain.Events;
using Bonyan.UserManagement.Domain.ValueObjects;
using Nezam.Modular.ESS.Identity.Domain.Shared.Roles;

namespace Nezam.Modular.ESS.IdEntity.Domain.User.Events;
namespace Nezam.Modular.ESS.Identity.Domain.Shared.User.Events;

public class RoleAssignedEvent : BonDomainEventBase
{
public BonUserId UserId { get; }
public string RoleName { get; }
public RoleId RoleId { get; }
public DateTime Timestamp { get; }

public RoleAssignedEvent(BonUserId userId, string roleName)
public RoleAssignedEvent(BonUserId userId, RoleId roleName)
{
UserId = userId;
RoleName = roleName;
RoleId = roleName;
Timestamp = DateTime.UtcNow;
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
using Bonyan.Layer.Domain.Events;
using Bonyan.UserManagement.Domain.ValueObjects;
using Nezam.Modular.ESS.Identity.Domain.Shared.Roles;

namespace Nezam.Modular.ESS.IdEntity.Domain.User.Events;
namespace Nezam.Modular.ESS.Identity.Domain.Shared.User.Events;

public class RoleRemovedEvent : BonDomainEventBase
{
public BonUserId UserId { get; }
public string RoleName { get; }
public RoleId RoleName { get; }
public DateTime Timestamp { get; }

public RoleRemovedEvent(BonUserId userId, string roleName)
public RoleRemovedEvent(BonUserId userId, RoleId roleName)
{
UserId = userId;
RoleName = roleName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Bonyan.Layer.Domain.Events;
using Bonyan.UserManagement.Domain.ValueObjects;

namespace Nezam.Modular.ESS.IdEntity.Domain.User.Events;
namespace Nezam.Modular.ESS.Identity.Domain.Shared.User.Events;

public class UserActivatedEvent : BonDomainEventBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Bonyan.Layer.Domain.Events;
using Bonyan.UserManagement.Domain.ValueObjects;

namespace Nezam.Modular.ESS.IdEntity.Domain.User.Events;
namespace Nezam.Modular.ESS.Identity.Domain.Shared.User.Events;

public class UserDeactivatedEvent : BonDomainEventBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Nezam.Modular.ESS.Identity.Domain.Shared.User;

public static class UserConst
{
public const string DefaultPassword = "Nezam@123";
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Bonyan.Layer.Application.Dto;
using Bonyan.UserManagement.Domain.ValueObjects;
using Nezam.Modular.ESS.IdEntity.Application.Users.Dto;
using Nezam.Modular.ESS.Identity.Application.Users.Dto;
using Nezam.Modular.ESS.Secretariat.Domain.Documents;
using Nezam.Modular.ESS.Secretariat.Domain.Documents.BonEnumerations;
using Nezam.Modular.ESS.Secretariat.Domain.Documents.ValueObjects;
using Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.Enumerations;
using Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.ValueObjects;

namespace Nezam.Modular.ESS.Secretariat.Application.Documents;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using AutoMapper;
using Microsoft.Extensions.Localization;
using Nezam.Modular.ESS.Secretariat.Application.Documents;
using Nezam.Modular.ESS.Secretariat.Application.Resources;
using Nezam.Modular.ESS.Secretariat.Domain.Documents;

namespace Nezam.Modular.ESS.IdEntity.Application.Employers
namespace Nezam.Modular.ESS.Secretariat.Application.Documents
{
public class DocumentProfile : Profile
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
using Bonyan.Layer.Application.Services;
using Bonyan.Layer.Domain.Enumerations;
using Bonyan.UserManagement.Domain.ValueObjects;
using Nezam.Modular.ESS.IdEntity.Domain.User;
using Nezam.Modular.ESS.Identity.Domain.Shared.User;
using Nezam.Modular.ESS.Identity.Domain.User;
using Nezam.Modular.ESS.Secretariat.Domain.Documents;
using Nezam.Modular.ESS.Secretariat.Domain.Documents.BonEnumerations;
using Nezam.Modular.ESS.Secretariat.Domain.Documents.Repositories;
using Nezam.Modular.ESS.Secretariat.Domain.Documents.ValueObjects;
using Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.Enumerations;
using Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.ValueObjects;

namespace Nezam.Modular.ESS.Secretariat.Application.Documents;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Bonyan.Layer.Application.Services;
using Bonyan.UserManagement.Domain.ValueObjects;
using Nezam.Modular.ESS.Secretariat.Domain.Documents.ValueObjects;
using Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.ValueObjects;

namespace Nezam.Modular.ESS.Secretariat.Application.Documents;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Bonyan.Layer.Application" Version="1.1.6-pre2" />
<PackageReference Include="Bonyan.Layer.Domain" Version="1.1.6-pre2" />
<PackageReference Include="Bonyan.Layer.Application" Version="1.1.7" />
<PackageReference Include="Bonyan.Layer.Domain" Version="1.1.7" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Bonyan.Layer.Domain.Enumerations;

namespace Nezam.Modular.ESS.Secretariat.Domain.Documents.BonEnumerations;
namespace Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.Enumerations;

public class DocumentStatus : BonEnumeration
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Bonyan.Layer.Domain.Enumerations;

namespace Nezam.Modular.ESS.Secretariat.Domain.Documents.BonEnumerations;
namespace Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.Enumerations;

public class DocumentType : BonEnumeration
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Bonyan.Layer.Domain.Enumerations;

namespace Nezam.Modular.ESS.Secretariat.Domain.Documents.BonEnumerations;
namespace Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.Enumerations;

public class ReferralStatus : BonEnumeration
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Bonyan.Layer.Domain.Events;
using Nezam.Modular.ESS.Secretariat.Domain.Documents.ValueObjects;
using Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.ValueObjects;

namespace Nezam.Modular.ESS.Secretariat.Domain.Documents.Events;
namespace Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.Events;

public class DocumentArchivedEvent : BonDomainEventBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Bonyan.Layer.Domain.Events;
using Nezam.Modular.ESS.Secretariat.Domain.Documents.ValueObjects;
using Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.ValueObjects;

namespace Nezam.Modular.ESS.Secretariat.Domain.Documents.Events;
namespace Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.Events;

public class DocumentAttachmentAddedEvent : BonDomainEventBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Bonyan.Layer.Domain.Events;
using Nezam.Modular.ESS.Secretariat.Domain.Documents.ValueObjects;
using Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.ValueObjects;

namespace Nezam.Modular.ESS.Secretariat.Domain.Documents.Events;
namespace Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.Events;

public class DocumentAttachmentRemovedEvent : BonDomainEventBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Bonyan.Layer.Domain.Events;
using Nezam.Modular.ESS.Secretariat.Domain.Documents.ValueObjects;
using Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.ValueObjects;

namespace Nezam.Modular.ESS.Secretariat.Domain.Documents.Events;
namespace Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.Events;

public class DocumentAttachmentUpdatedEvent : BonDomainEventBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Bonyan.Layer.Domain.Events;
using Nezam.Modular.ESS.Secretariat.Domain.Documents.ValueObjects;
using Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.ValueObjects;

namespace Nezam.Modular.ESS.Secretariat.Domain.Documents.Events;
namespace Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.Events;

public class DocumentContentUpdatedEvent : BonDomainEventBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Bonyan.Layer.Domain.Events;
using Nezam.Modular.ESS.Secretariat.Domain.Documents.ValueObjects;
using Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.ValueObjects;

namespace Nezam.Modular.ESS.Secretariat.Domain.Documents.Events
namespace Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.Events
{
// Event raised when a document is created
public class DocumentCreatedEvent : BonDomainEventBase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Bonyan.Layer.Domain.Events;
using Bonyan.UserManagement.Domain.ValueObjects;
using Nezam.Modular.ESS.Secretariat.Domain.Documents.ValueObjects;
using Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.ValueObjects;

namespace Nezam.Modular.ESS.Secretariat.Domain.Documents.Events;
namespace Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.Events;

public class DocumentReferralCreatedEvent : BonDomainEventBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Bonyan.Layer.Domain.Events;
using Nezam.Modular.ESS.Secretariat.Domain.Documents.ValueObjects;
using Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.ValueObjects;

namespace Nezam.Modular.ESS.Secretariat.Domain.Documents.Events;
namespace Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.Events;

public class DocumentReferralRespondedEvent : BonDomainEventBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Bonyan.Layer.Domain.Events;
using Nezam.Modular.ESS.Secretariat.Domain.Documents.ValueObjects;
using Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.ValueObjects;

namespace Nezam.Modular.ESS.Secretariat.Domain.Documents.Events;
namespace Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.Events;

public class DocumentRevertedToDraftEvent : BonDomainEventBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Bonyan.Layer.Domain.Events;
using Nezam.Modular.ESS.Secretariat.Domain.Documents.ValueObjects;
using Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.ValueObjects;

namespace Nezam.Modular.ESS.Secretariat.Domain.Documents.Events;
namespace Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.Events;

public class DocumentSentEvent : BonDomainEventBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Bonyan.Layer.Domain.Events;
using Nezam.Modular.ESS.Secretariat.Domain.Documents.ValueObjects;
using Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.ValueObjects;

namespace Nezam.Modular.ESS.Secretariat.Domain.Documents.Events;
namespace Nezam.Modular.ESS.Secretariat.Domain.Shared.Documents.Events;

public class DocumentTitleUpdatedEvent : BonDomainEventBase
{
Expand Down
Loading

0 comments on commit bda7548

Please sign in to comment.