using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SqlSugar;
using WIDESEAWCS_Core.DB.Models;
using WIDESEAWCS_Core.Tenants;

namespace WIDESEAWCS_Model.Models
{
    [SugarTable, MultiTenant]
    public class Sys_Log
    {
        /// <summary>
        /// 主键
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "开始时间")]
        public DateTime? BeginDate { get; set; }

        /// <summary>
        /// æ—¶é•¿
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "æ—¶é•¿")]
        public int? ElapsedTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "结束时间")]
        public DateTime EndDate { get; set; }

        /// <summary>
        /// 日志类型
        /// </summary>
        //[SugarColumn(IsNullable = true, ColumnDescription = "日志类型")]
        //public DateTime LogType { get; set; }

        /// <summary>
        /// 请求参数
        /// </summary>
        [SugarColumn(IsNullable = true, Length = int.MaxValue, ColumnDescription = "请求参数")]
        public string RequestParam { get; set; }

        /// <summary>
        /// 响应参数
        /// </summary>
        [SugarColumn(IsNullable = true, Length = int.MaxValue, ColumnDescription = "响应参数")]
        public string ResponseParam { get; set; }

        /// <summary>
        /// 响应状态
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "响应状态")]
        public int? Success { get; set; }

        /// <summary>
        /// 请求地址
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 2000, ColumnDescription = "请求地址")]
        public string Url { get; set; }

        /// <summary>
        /// 用户IP
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 20, ColumnDescription = "用户IP")]
        public string UserIP { get; set; }

        /// <summary>
        /// 用户名称
        /// </summary>
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "用户名称")]
        public string? UserName { get; set; }

        /// <summary>
        /// 用户主键
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDescription = "用户主键")]
        public int? UserId { get; set; }
    }
}