Table of Contents

Class UserLoginAttempt

Namespace
GastroSky.Models
Assembly
GastroSky.Models.dll

Logged User login attempt. Yes: we record and keep track of every login attempt. Failed and successful ones.

[Table("UserLoginAttempts")]
[Index("Email", new string[] { "Successful", "TimestampUTC" }, IsUnique = true)]
public class UserLoginAttempt
Inheritance
UserLoginAttempt
Inherited Members

Properties

Email

The attempted login email value.

public string? Email { get; set; }

Property Value

string

Id

Meaningless sequential integer that serves purely as a DB primary key.

[Key]
public long Id { get; set; }

Property Value

long

Successful

Whether or not the login attempt was successful.

public bool Successful { get; set; }

Property Value

bool

TimestampUTC

Unix-timestamp of the login attempt.

public long TimestampUTC { get; set; }

Property Value

long

User

The User associated with this login attempt (if any).

[ForeignKey("UserId")]
public User? User { get; set; }

Property Value

User

UserAgent

UserAgent from which the login request was sent.

[ForeignKey("UserAgentId")]
public UserAgent? UserAgent { get; set; }

Property Value

UserAgent

UserAgentId

Id of the UserAgent from which the login request was sent.

public long? UserAgentId { get; set; }

Property Value

long?

UserId

The Id of the User associated with this login attempt (if any).

public long? UserId { get; set; }

Property Value

long?