Remake entire db for identity

This commit is contained in:
2025-04-20 17:39:03 +02:00
parent 51dab81121
commit 43bd22c1d7
13 changed files with 1533 additions and 86 deletions

View File

@@ -6,4 +6,8 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="9.0.4" />
</ItemGroup>
</Project>

View File

@@ -15,9 +15,9 @@ public partial class Game
public string Title { get; set; } = null!;
public DateTime? ReleaseDate { get; set; }
public DateTime CreationDate { get; set; }
public int CreationUserId { get; set; }
public string CreationUserId { get; set; } = null!;
public DateTime? ModificationDate { get; set; }
public int? ModificationUserId { get; set; }
public string? ModificationUserId { get; set; }
public double? StorageSpace { get; set; }
public string? Description { get; set; }
public int Interest { get; set; }

View File

@@ -1,6 +1,8 @@
namespace GameIdeas.Shared.Model;
using Microsoft.AspNetCore.Identity;
public partial class User
namespace GameIdeas.Shared.Model;
public partial class User : IdentityUser
{
public User()
{
@@ -8,11 +10,6 @@ public partial class User
ModificationGames = new HashSet<Game>();
}
public int Id { get; set; }
public string Username { get; set; } = null!;
public string Password { get; set; } = null!;
public int Role { get; set; }
public virtual ICollection<Game> CreationGames { get; set; }
public virtual ICollection<Game> ModificationGames { get; set; }
}