using DataSharing.Share.Enums;
using SqlSugar;
using System.ComponentModel;
using XF.Domain.Repository;

namespace DataSharing.RawData
{
    /// <summary>
    /// 推送业务系统失败数据
    /// </summary>
    [Description("推送业务系统失败数据")]
    public class SendHotlineErrorData : CreationModificationEntity
    {
        /// <summary>
        /// 原始数据ID
        /// </summary>
        public string DataId { get; set; }

        /// <summary>
        /// 平台名称
        /// </summary>
        [SugarColumn(ColumnDescription = "平台名称")]
        public EPlatformSource PlatformSource { get; set; } = EPlatformSource.Province;

        /// <summary>
        /// 接收接口名称
        /// </summary>
        [SugarColumn(ColumnDescription = "接收接口名称", ColumnDataType = "varchar(100)")]
        public string? ReceiveServiceInterface { get; set; }

        /// <summary>
        /// 接收的原始数据
        /// </summary>
        [SugarColumn(ColumnDataType = "text", ColumnDescription = "接收的原始数据")]
        public string? RawData { get; set; }

        /// <summary>
        /// 组装参数
        /// </summary>
        [SugarColumn(ColumnDataType = "text", ColumnDescription = "组装参数")]
        public string? RequestData { get; set; }

        /// <summary>
        /// 推送次数
        /// </summary>
        [SugarColumn(ColumnDescription = "推送次数")]
        public int SendTimes { get; set; }

        /// <summary>
        /// 请求地址
        /// </summary>
        [SugarColumn(ColumnDescription = "请求地址")]
        public string? Path { get; set; }

        /// <summary>
        /// 请求方式
        /// </summary>
        [SugarColumn(ColumnDescription = "请求方式")]
        public string? HttpMethod { get; set; }

        /// <summary>
        /// 错误消息
        /// </summary>
        [SugarColumn(ColumnDescription = "错误消息")]
        public string? ErrorMessage { get; set; }
    }
}
