Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mehmetalierol/36795aba0c3ad1d2e25f3546b30fe48c to your computer and use it in GitHub Desktop.
Save mehmetalierol/36795aba0c3ad1d2e25f3546b30fe48c to your computer and use it in GitHub Desktop.
using Company.Application.Common.Enums;
using Microsoft.AspNetCore.Identity;
using System;
namespace Company.Application.Data.Entities
{
/// <summary>
/// Bu sınıf IdentityRole sınıfından kalıtım alır
/// Sistemde bulunan tüm roller bu sınıf ile kontrol edilecek
/// </summary>
public class ApplicationRole : IdentityRole<Guid>
{
private AppStatus status;
private DateTime createdDate;
/// <summary>
/// Mevcut IdentityRole propertylerine ek propertyler eklemek istiyorsak bu alanda istediğimiz gibi tanımlama yapabiliriz.
/// </summary>
public string Description { get; set; }
/// <summary>
/// Bu rolü kimin oluşturduğu bilgisi
/// </summary>
public DateTime? CreateDate
{
get
{
return createdDate;
}
set
{
createdDate = value ?? DateTime.UtcNow;
}
}
public Guid? Creator { get; set; }
public AppStatus? Status
{
get
{
return status;
}
set
{
status = value ?? AppStatus.Aktif;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment