using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using MongoDB.Bson.Serialization.Attributes; using MongoRepository; using MongoRepository.Attributes; namespace CommonDomain { [BsonCollection("api_log_{yyyyMM}", "data_0524")] [BsonIgnoreExtraElements] public class ApiLog : MongoBaseEntity { public string clientIP { get; set; } /// /// token /// public string accessToken { get; set; } public long consumeTime { get; set; } public string requestUrl { get; set; } public string requestMethod { get; set; } public string requestQuery { get; set; } public string requestBody { get; set; } public string requestHead { get; set; } public int httpStatus { get; set; } public string responseBody { get; set; } /// /// agent /// public string userAgent { get; set; } [BsonDateTimeOptions(Kind = DateTimeKind.Local)] public DateTime requestTime { get; set; } = DateTime.Now; public string version { get; set; } public string source { get; set; } public string device { get; set; } public string deviceId { get; set; } public string ip { get; set; } public string sign { get; set; } } }