Fixed tenant management
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
namespace PostFundManagement.Domain.Entities;
|
||||
namespace PostFundManagement.Domain.Entities;
|
||||
|
||||
[EntityTypeConfiguration<TenantOrganisationConfiguration, TenantOrganisation>]
|
||||
public class TenantOrganisation : Models.TenantOrganisation
|
||||
{
|
||||
public virtual Tenant? Tenant { get; set; }
|
||||
|
||||
public virtual Organisation? Organisation { get; set; }
|
||||
public new virtual Organisation? Organisation { get; set; }
|
||||
|
||||
public virtual User? Creator { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace PostFundManagement.Domain.Entities;
|
||||
namespace PostFundManagement.Domain.Entities;
|
||||
|
||||
[EntityTypeConfiguration<TenantUserConfiguration, TenantUser>]
|
||||
public class TenantUser : Models.TenantUser
|
||||
@@ -9,7 +9,7 @@ public class TenantUser : Models.TenantUser
|
||||
public virtual User? Creator { get; set; }
|
||||
|
||||
[ForeignKey(nameof(UserId))]
|
||||
public virtual User? User { get; set; }
|
||||
public new virtual User? User { get; set; }
|
||||
}
|
||||
|
||||
public sealed class TenantUserConfiguration : IEntityTypeConfiguration<TenantUser>
|
||||
|
||||
@@ -11,7 +11,8 @@ public static class Mappers
|
||||
CreatedAt = entity.CreatedAt,
|
||||
CreatedBy = entity.CreatedBy,
|
||||
Status = entity.Status,
|
||||
UserId = entity.UserId
|
||||
UserId = entity.UserId,
|
||||
User = entity.User?.Map()
|
||||
};
|
||||
|
||||
public static TenantOrganisation Map(this Entities.TenantOrganisation entity) => new()
|
||||
@@ -21,7 +22,8 @@ public static class Mappers
|
||||
CreatedAt = entity.CreatedAt,
|
||||
CreatedBy = entity.CreatedBy,
|
||||
OrganisationId = entity.OrganisationId,
|
||||
TenantId = entity.TenantId
|
||||
TenantId = entity.TenantId,
|
||||
Organisation = entity.Organisation?.Map()
|
||||
};
|
||||
|
||||
public static Tenant Map(this Entities.Tenant entity) => new()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace PostFundManagement.Domain.Models;
|
||||
namespace PostFundManagement.Domain.Models;
|
||||
|
||||
public class TenantOrganisation
|
||||
{
|
||||
@@ -13,4 +13,6 @@ public class TenantOrganisation
|
||||
public long OrganisationId { get; set; }
|
||||
|
||||
public ActivityStatus Status { get; set; }
|
||||
|
||||
public Organisation? Organisation { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace PostFundManagement.Domain.Models;
|
||||
namespace PostFundManagement.Domain.Models;
|
||||
|
||||
public class TenantUser
|
||||
{
|
||||
@@ -13,4 +13,6 @@ public class TenantUser
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
public ActivityStatus Status { get; set; }
|
||||
|
||||
public User? User { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user