using dodohold.core;

namespace molilian.core
{
    public enum TkSubCodeEnum
    {
        /// <summary>
        /// 初筛1
        /// </summary>
        Prelim1 = 101,

        /// <summary>
        /// 初筛2
        /// </summary>
        Prelim2 = 102,

        /// <summary>
        /// 流量控制
        /// </summary>
        TrafficCtrl = 103,

        /// <summary>
        /// 非标链接
        /// </summary>
        NonStdLink = 104,

        /// <summary>
        /// 其他推广
        /// </summary>
        OtherPromo = 105,

        /// <summary>
        /// 链接不可转
        /// </summary>
        NoConvert = 106,

        /// <summary>
        /// 网络错误
        /// </summary>
        NetError = 107,

        /// <summary>
        /// 转链成功
        /// </summary>
        Success = 108,

        /// <summary>
        /// 其他
        /// </summary>
        Other = 109,

        /// <summary>
        /// 初筛1.5
        /// </summary>
        Prelim1_5 = 110,

        Captcha = 111,

        /// <summary>
        /// 初筛3
        /// </summary>
        Prelim3 = 112,

    }


    public class TkDataDTO
    {
        [Key]
        public long id { get; set; }
        public TkChannelEnum channel { get; set; }
        public LinkTypeEnum link_type { get; set; }
        public ChannelTypeEnum channel_type { get; set; } = ChannelTypeEnum.none;
        public int accountId { get; set; } = 0;
        public string accountName { get; set; } = string.Empty;
        public bool success { get; set; } = true;
        public string message { get; set; } = string.Empty;
        public string reason { get; set; } = string.Empty;
        public string content { get; set; } = string.Empty;
        public string rawContent { get; set; } = string.Empty;
        public string rawContent2 { get; set; } = string.Empty;
        public string shortLinkurl { get; set; } = string.Empty;
        public string deeplink_url { get; set; } = string.Empty;
        public int elapsedTime { get; set; } = 0;
        public int elapsedTime2 { get; set; } = 0;
        public int elapsedTime3 { get; set; } = 0;
        public string ip { get; set; } = string.Empty;
        public string oaid { get; set; } = string.Empty;


        public string taoToken { get; set; } = string.Empty;
        public string num_iid { get; set; } = string.Empty;


        public string itemId { get; set; } = string.Empty;
        public string itemName { get; set; } = string.Empty;
        public decimal couponAmount { get; set; } = 0;
        public decimal promotionPrice { get; set; } = 0;
        public string pic { get; set; } = string.Empty;
        public string sellerNickName { get; set; } = string.Empty;
        public string shopTitle { get; set; } = string.Empty;
        public string qrCodeUrl { get; set; } = string.Empty;
        public DateTime create_time { get; set; } = DateTime.Now;

        [IgnoreInsert, IgnoreUpdate]
        public string couponEffectiveStartTime { get; set; } = string.Empty;
        [IgnoreInsert, IgnoreUpdate]
        public string couponEffectiveEndTime { get; set; } = string.Empty;
        public string end_point { get; set; } = string.Empty;
        public TkSubCodeEnum subCode { get; set; } = TkSubCodeEnum.Other;

    }

}
