Browse Source

Added IHasEntityVersion to related classes and etos

pull/15169/head
malik masis 4 years ago
parent
commit
30aec8b9fc
  1. 5
      modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityUserDto.cs
  2. 1
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo.Abp.Identity.Domain.Shared.csproj
  3. 5
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/IdentityRoleEto.cs
  4. 5
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/OrganizationUnitEto.cs
  5. 7
      modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityRole.cs
  6. 7
      modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUser.cs
  7. 8
      modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/OrganizationUnit.cs

5
modules/identity/src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/IdentityUserDto.cs

@ -1,11 +1,12 @@
using System;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Auditing;
using Volo.Abp.Domain.Entities;
using Volo.Abp.MultiTenancy;
namespace Volo.Abp.Identity;
public class IdentityUserDto : ExtensibleFullAuditedEntityDto<Guid>, IMultiTenant, IHasConcurrencyStamp
public class IdentityUserDto : ExtensibleFullAuditedEntityDto<Guid>, IMultiTenant, IHasConcurrencyStamp, IHasEntityVersion
{
public Guid? TenantId { get; set; }
@ -30,4 +31,6 @@ public class IdentityUserDto : ExtensibleFullAuditedEntityDto<Guid>, IMultiTenan
public DateTimeOffset? LockoutEnd { get; set; }
public string ConcurrencyStamp { get; set; }
public int EntityVersion { get; set; }
}

1
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo.Abp.Identity.Domain.Shared.csproj

@ -24,6 +24,7 @@
<ProjectReference Include="..\..\..\users\src\Volo.Abp.Users.Domain.Shared\Volo.Abp.Users.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Validation\Volo.Abp.Validation.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Features\Volo.Abp.Features.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Auditing\Volo.Abp.Auditing.csproj" />
</ItemGroup>
<ItemGroup>

5
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/IdentityRoleEto.cs

@ -1,10 +1,11 @@
using System;
using Volo.Abp.Auditing;
using Volo.Abp.MultiTenancy;
namespace Volo.Abp.Identity;
[Serializable]
public class IdentityRoleEto : IMultiTenant
public class IdentityRoleEto : IMultiTenant, IHasEntityVersion
{
public Guid Id { get; set; }
@ -17,4 +18,6 @@ public class IdentityRoleEto : IMultiTenant
public bool IsStatic { get; set; }
public bool IsPublic { get; set; }
public int EntityVersion { get; set; }
}

5
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/OrganizationUnitEto.cs

@ -1,10 +1,11 @@
using System;
using Volo.Abp.Auditing;
using Volo.Abp.MultiTenancy;
namespace Volo.Abp.Identity;
[Serializable]
public class OrganizationUnitEto : IMultiTenant
public class OrganizationUnitEto : IMultiTenant, IHasEntityVersion
{
public Guid Id { get; set; }
@ -13,4 +14,6 @@ public class OrganizationUnitEto : IMultiTenant
public string Code { get; set; }
public string DisplayName { get; set; }
public int EntityVersion { get; set; }
}

7
modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityRole.cs

@ -14,7 +14,7 @@ namespace Volo.Abp.Identity;
/// <summary>
/// Represents a role in the identity system
/// </summary>
public class IdentityRole : AggregateRoot<Guid>, IMultiTenant
public class IdentityRole : AggregateRoot<Guid>, IMultiTenant, IHasEntityVersion
{
public virtual Guid? TenantId { get; protected set; }
@ -49,6 +49,11 @@ public class IdentityRole : AggregateRoot<Guid>, IMultiTenant
/// </summary>
public virtual bool IsPublic { get; set; }
/// <summary>
/// An entity version property that auto-increments when the entity changes.
/// </summary>
public virtual int EntityVersion { get; protected set; }
/// <summary>
/// Initializes a new instance of <see cref="IdentityRole"/>.
/// </summary>

7
modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUser.cs

@ -12,7 +12,7 @@ using Volo.Abp.Users;
namespace Volo.Abp.Identity;
public class IdentityUser : FullAuditedAggregateRoot<Guid>, IUser
public class IdentityUser : FullAuditedAggregateRoot<Guid>, IUser, IHasEntityVersion
{
public virtual Guid? TenantId { get; protected set; }
@ -112,6 +112,11 @@ public class IdentityUser : FullAuditedAggregateRoot<Guid>, IUser
/// </summary>
public virtual int AccessFailedCount { get; protected internal set; }
/// <summary>
/// An entity version property that auto-increments when the entity changes.
/// </summary>
public virtual int EntityVersion { get; protected set; }
//TODO: Can we make collections readonly collection, which will provide encapsulation. But... can work for all ORMs?
/// <summary>

8
modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/OrganizationUnit.cs

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using Volo.Abp.Auditing;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
@ -10,7 +11,7 @@ namespace Volo.Abp.Identity;
/// <summary>
/// Represents an organization unit (OU).
/// </summary>
public class OrganizationUnit : FullAuditedAggregateRoot<Guid>, IMultiTenant
public class OrganizationUnit : FullAuditedAggregateRoot<Guid>, IMultiTenant, IHasEntityVersion
{
public virtual Guid? TenantId { get; protected set; }
@ -33,6 +34,11 @@ public class OrganizationUnit : FullAuditedAggregateRoot<Guid>, IMultiTenant
/// </summary>
public virtual string DisplayName { get; set; }
/// <summary>
/// An entity version property that auto-increments when the entity changes.
/// </summary>
public virtual int EntityVersion { get; set; }
/// <summary>
/// Roles of this OU.
/// </summary>

Loading…
Cancel
Save