btcpayserver/BTCPayServer.Data/Data/ApplicationUser.cs

35 lines
1.3 KiB
C#
Raw Normal View History

using System;
2017-09-13 15:47:34 +09:00
using System.Collections.Generic;
2020-06-28 17:55:27 +09:00
using Microsoft.AspNetCore.Identity;
2021-11-15 10:27:19 +01:00
using Microsoft.EntityFrameworkCore;
2017-09-13 15:47:34 +09:00
namespace BTCPayServer.Data
2017-09-13 15:47:34 +09:00
{
// Add profile data for application users by adding properties to the ApplicationUser class
public class ApplicationUser : IdentityUser
{
public bool RequiresEmailConfirmation { get; set; }
public List<StoredFile> StoredFiles { get; set; }
[Obsolete("U2F support has been replace with FIDO2")]
public List<U2FDevice> U2FDevices { get; set; }
public List<APIKeyData> APIKeys { get; set; }
public DateTimeOffset? Created { get; set; }
public string DisabledNotifications { get; set; }
public List<NotificationData> Notifications { get; set; }
public List<UserStore> UserStores { get; set; }
public List<Fido2Credential> Fido2Credentials { get; set; }
2021-12-31 16:59:02 +09:00
public byte[] Blob { get; set; }
2021-11-15 10:27:19 +01:00
public List<IdentityUserRole<string>> UserRoles { get; set; }
public static void OnModelCreating(ModelBuilder builder)
{
builder.Entity<ApplicationUser>()
.HasMany<IdentityUserRole<string>>(user => user.UserRoles)
.WithOne().HasForeignKey(role => role.UserId);
}
}
2017-09-13 15:47:34 +09:00
}