mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
fix searching of push tokens
This commit is contained in:
@@ -10,9 +10,24 @@ public class UserPushTokenConfiguration : IEntityTypeConfiguration<UserPushToken
|
||||
{
|
||||
builder.HasKey(t => t.Id);
|
||||
|
||||
builder.HasIndex(x => x.Token).IsUnique();
|
||||
builder.HasIndex(x => x.UserSessionId).IsUnique();
|
||||
builder.HasIndex(x => x.UserId).IsUnique();
|
||||
builder.HasIndex(x => x.Token)
|
||||
.IsUnique();
|
||||
|
||||
builder.HasIndex(x => x.UserSessionId)
|
||||
.IsUnique();
|
||||
|
||||
builder.HasIndex(x => new { x.UserId, x.IsActive });
|
||||
|
||||
builder.Property(x => x.Token)
|
||||
.IsRequired()
|
||||
.HasMaxLength(512);
|
||||
|
||||
builder.Property(x => x.Platform)
|
||||
.IsRequired()
|
||||
.HasMaxLength(50);
|
||||
|
||||
builder.Property(x => x.Provider)
|
||||
.IsRequired()
|
||||
.HasMaxLength(50);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user