54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
using MongoDB.Bson;
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
using MongoRepository;
|
|
using MongoRepository.Attributes;
|
|
using MongoRepository.Config;
|
|
|
|
namespace UserDomain.Entity
|
|
{
|
|
[BsonCollection("user_login_log", ServiceDatabases.User)]
|
|
[BsonIgnoreExtraElements]
|
|
public class UserLoginLog : MongoBaseEntity
|
|
{
|
|
[BsonElement("userid")]
|
|
public string? UserId { get; set; }
|
|
|
|
[BsonElement("usernumber")]
|
|
public string? UserNumber { get; set; }
|
|
|
|
[BsonElement("username")]
|
|
public string? UserName { get; set; }
|
|
|
|
[BsonElement("logintype")]
|
|
public int LoginType { get; set; } = 1;
|
|
|
|
[BsonElement("status")]
|
|
public int Status { get; set; } = 1;
|
|
|
|
[BsonElement("ip")]
|
|
public string? Ip { get; set; }
|
|
|
|
[BsonElement("iplocation")]
|
|
public string? IpLocation { get; set; }
|
|
|
|
[BsonElement("devicetype")]
|
|
public string? DeviceType { get; set; }
|
|
|
|
[BsonElement("deviceid")]
|
|
public string? DeviceId { get; set; }
|
|
|
|
[BsonElement("platform")]
|
|
public int Platform { get; set; } = 1;
|
|
|
|
[BsonElement("clientversion")]
|
|
public string? ClientVersion { get; set; }
|
|
|
|
[BsonElement("failreason")]
|
|
public string? FailReason { get; set; }
|
|
|
|
[BsonElement("logintime")]
|
|
[BsonDateTimeOptions(Kind = DateTimeKind.Local, DateOnly = false)]
|
|
public DateTime LoginTime { get; set; } = DateTime.Now;
|
|
}
|
|
}
|