Last active
September 23, 2018 08:37
-
-
Save mehmetalierol/36795aba0c3ad1d2e25f3546b30fe48c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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