Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.