17 lines
508 B
C#
17 lines
508 B
C#
using MongoDB.Bson;
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
|
|
namespace Auth.Models;
|
|
|
|
public class User
|
|
{
|
|
[BsonId] [BsonRepresentation(BsonType.ObjectId)]
|
|
public string Id { get; set; } = default!;
|
|
public string Username { get; set; } = default!;
|
|
public string PasswordHash { get; set; } = default!;
|
|
public string Role { get; set; } = "USER";
|
|
public string? Email { get; set; }
|
|
public string? RefreshToken { get; set; }
|
|
public DateTime? RefreshTokenExpiry { get; set; }
|
|
}
|