Last active
September 29, 2018 11:40
-
-
Save mehmetalierol/494a6d026375a55ce08ef6dfefcfa8f8 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> | |
/// Kullanıcılar ve rollerin ilişkilendirildiği tablo. Many to many bir ilişki kurmak için 3. bir tabloya ihtiyaç duyuluyor | |
/// </summary> | |
public class ApplicationUserRole : IdentityUserRole<Guid> | |
{ | |
private AppStatus status; | |
private DateTime createdDate; | |
public Guid Id { get; set; } | |
/// <summary> | |
/// Kullanıcı bilgisi | |
/// </summary> | |
public virtual ApplicationUser User { get; set; } | |
/// <summary> | |
/// Role bilgisi | |
/// </summary> | |
public virtual ApplicationRole Role { get; set; } | |
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