using MadRunFabric.Common;
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace MadRunFabric.Model
{
    /// <summary>
    /// 登录日志
    /// </summary>
    public class Sys_User_LoginLogs : IBaseModel<string>
    {
        /// <summary>
        /// id
        /// </summary>
        [Key]
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string id { get; set; }
        /// <summary>
        /// 登录id
        /// </summary>
        public string loginid { get; set; }
        /// <summary>
        /// 登录名称
        /// </summary>
        public string loginname { get; set; }
        /// <summary>
        /// 版本号
        /// </summary>
        public string result { get; set; }
        /// <summary>
        /// 登录ip
        /// </summary>
        public string loginip { get; set; }
        /// <summary>
        /// 登录主机名称
        /// </summary>
        public string loginhostname { get; set; }
        /// <summary>
        /// 登录时间
        /// </summary>
        public DateTime logintime { get; set; } = DateTime.Now.ToLocalTime();
        /// <summary>
        /// 退出时间
        /// </summary>
        public DateTime? loginouttime { get; set; }
        /// <summary>
        /// 状态（预留）
        /// </summary>
        public int statetype { get; set; } = 0;
        /// <summary>
        /// 是否删除（0正常 -1删除）
        /// </summary>
        public int isdelete { get; set; } = 0;
        /// <summary>
        /// 备注
        /// </summary>
        public string content { get; set; }
    }
}
