using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace MiAssessment.Model.Entities; /// /// 用户登录日志表,记录用户每次登录信息 /// [Table("user_login_logs")] public class UserLoginLog { /// /// 主键ID /// [Key] public long Id { get; set; } /// /// 用户ID /// public long UserId { get; set; } /// /// 登录类型(wechat/mobile/sms等) /// [Required] [MaxLength(20)] public string LoginType { get; set; } = null!; /// /// 登录IP /// [MaxLength(50)] public string? LoginIp { get; set; } /// /// 用户代理 /// [MaxLength(500)] public string? UserAgent { get; set; } /// /// 平台(miniprogram/h5/app等) /// [MaxLength(20)] public string? Platform { get; set; } /// /// 状态:1成功 0失败 /// public int Status { get; set; } /// /// 失败原因 /// [MaxLength(200)] public string? FailReason { get; set; } /// /// 创建时间 /// public DateTime CreateTime { get; set; } }