using MadRunFabric.Common; using MongoDB.Bson.Serialization.Attributes; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Text; namespace MadRunFabric.Model { public class Sys_Login_Logs : IBaseModel { /// /// id /// [Key] [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)] public string id { get; set; } /// /// 用户名字 /// public string username { get; set; } /// /// 用户工号 /// public string usercode { get; set; } /// /// 备注 /// public string result { get; set; } /// /// ip /// public string login_ip { get; set; } /// /// hostname /// public string hostname { get; set; } /// /// 渠道来源 1表示PC 2表示安卓 3表示IOS 4表示微信 /// public int channel { get; set; } = 1; private DateTime _time = DateTime.Now.ToLocalTime(); /// /// 登录登出时间 /// public DateTime time { get { return _time.ToLocalTime(); } set { _time = value; //确保可为null } } /// /// 1表示未删除 /// public int state { get; set; } = 1; /// /// 当前用户id /// [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)] public string user_id { get; set; } } }