using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AipGateway.API.Domain.Entities
{
    [Table("TB_AIP_API_CALL_LOG")]
    public class TbAipApiCallLog
    {
        [Key]
        //[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        //[DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        //public Int64 Id { get; set; }
        //public DateTime LogDate { get; set; }
        public string ApiEndPoint { get; set; } = string.Empty;
        public string ApiGuid { get; set; } = string.Empty;
        public string? IPAddress { get; set; }
        public DateTime RequestAt { get; set; }
        public DateTime ResponseAt { get; set; }
        public int ResponseStatusCode { get; set; }
        public int ResponseTime { get; set; }
        public int ErrorCode { get; set; }
        public string? ErrorMessage { get; set; }


        public override string ToString()
        {
            return "TbAipApiCallLog{ ApiEndPoint: " + ApiEndPoint + ", ApiGuid: " + ApiGuid +
                ", RequestAt: " + RequestAt + ", ResponseAt: " + ResponseAt +
                ", IPAddress: " + IPAddress + ", ResponseStatusCode: " + ResponseStatusCode + ", ResponseTime: " + ResponseTime +
                ", ErrorCode: " + ErrorCode + ", ErrorMessage: " + ErrorMessage + " }";
        }
    }
}
