Initial code commit.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Sufi.Demo.PeopleDirectory.Domain.Common;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Sufi.Demo.PeopleDirectory.Persistence.Models.Identity
|
||||
{
|
||||
public class AppRole : IdentityRole, IAuditableEntity<string>
|
||||
{
|
||||
[Column(TypeName = "character varying(100)")]
|
||||
public string? Description { get; set; }
|
||||
public string? CreatedBy { get; set; }
|
||||
public DateTime CreatedOn { get; set; }
|
||||
public string? LastModifiedBy { get; set; }
|
||||
public DateTime? LastModifiedOn { get; set; }
|
||||
public virtual ICollection<AppRoleClaim> RoleClaims { get; set; }
|
||||
|
||||
public AppRole() : base()
|
||||
{
|
||||
RoleClaims = new HashSet<AppRoleClaim>();
|
||||
}
|
||||
|
||||
public AppRole(string roleName, string? description = null) : base(roleName)
|
||||
{
|
||||
RoleClaims = new HashSet<AppRoleClaim>();
|
||||
Description = description;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Sufi.Demo.PeopleDirectory.Domain.Common;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Sufi.Demo.PeopleDirectory.Persistence.Models.Identity
|
||||
{
|
||||
public class AppRoleClaim : IdentityRoleClaim<string>, IAuditableEntity<int>
|
||||
{
|
||||
[Column(TypeName = "character varying(100)")]
|
||||
public string? Description { get; set; }
|
||||
[Column(TypeName = "character varying(100)")]
|
||||
public string? Group { get; set; }
|
||||
public string? CreatedBy { get; set; }
|
||||
public DateTime CreatedOn { get; set; }
|
||||
public string? LastModifiedBy { get; set; }
|
||||
public DateTime? LastModifiedOn { get; set; }
|
||||
|
||||
public AppRoleClaim() : base() { }
|
||||
|
||||
public AppRoleClaim(string? description = null, string? group = null) : base()
|
||||
{
|
||||
Description = description;
|
||||
Group = group;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Sufi.Demo.PeopleDirectory.Domain.Common;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Sufi.Demo.PeopleDirectory.Persistence.Models.Identity
|
||||
{
|
||||
public class AppUser : IdentityUser<string>, IAuditableEntity<string>
|
||||
{
|
||||
public bool IsActive { get; set; }
|
||||
public bool IsDeleted { get; set; }
|
||||
public DateTime? DeletedOn { get; set; }
|
||||
public string? CreatedBy { get; set; }
|
||||
public DateTime CreatedOn { get; set; }
|
||||
public string? LastModifiedBy { get; set; }
|
||||
public DateTime? LastModifiedOn { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user