stuff
This commit is contained in:
parent
14fd359ea8
commit
a4ef2b4a20
26 changed files with 331 additions and 78 deletions
|
@ -9,7 +9,16 @@ internal class UserIdentityTypeConfiguration : IEntityTypeConfiguration<UserIden
|
|||
public void Configure(EntityTypeBuilder<UserIdentity> builder)
|
||||
{
|
||||
builder.ToTable("user_identity");
|
||||
builder.OwnsOne(u => u.Password).WithOwner().HasForeignKey("user_id");
|
||||
builder.OwnsOne(u => u.Password, pw =>
|
||||
{
|
||||
pw.Property(p => p.Hash)
|
||||
.HasColumnName("password_hash")
|
||||
.IsRequired(false);
|
||||
|
||||
pw.Property(p => p.Salt)
|
||||
.HasColumnName("password_salt")
|
||||
.IsRequired(false);
|
||||
});
|
||||
builder.OwnsMany(u => u.Sessions).WithOwner().HasForeignKey("user_id");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue