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/494a6d026375a55ce08ef6dfefcfa8f8 to your computer and use it in GitHub Desktop.
Save mehmetalierol/494a6d026375a55ce08ef6dfefcfa8f8 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>
/// 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