[FA-10] Adds user service and authentication service
This commit is contained in:
20
FictionArchive.Service.UserService/Models/Database/User.cs
Normal file
20
FictionArchive.Service.UserService/Models/Database/User.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using FictionArchive.Service.Shared.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace FictionArchive.Service.UserService.Models.Database;
|
||||
|
||||
[Index(nameof(OAuthProviderId), IsUnique = true)]
|
||||
public class User : BaseEntity<Guid>
|
||||
{
|
||||
public string Username { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string OAuthProviderId { get; set; }
|
||||
|
||||
|
||||
public bool Disabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The user that generated an invite used by this user.
|
||||
/// </summary>
|
||||
public User? Inviter { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using FictionArchive.Service.Shared.Services.EventBus;
|
||||
|
||||
namespace FictionArchive.Service.UserService.Models.IntegrationEvents;
|
||||
|
||||
public class AuthUserAddedEvent : IIntegrationEvent
|
||||
{
|
||||
public string OAuthProviderId { get; set; }
|
||||
|
||||
public string InviterOAuthProviderId { get; set; }
|
||||
|
||||
// The email of the user that created the event
|
||||
public string EventUserEmail { get; set; }
|
||||
|
||||
// The username of the user that created the event
|
||||
public string EventUserUsername { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user