using dodohold.core;
using System;
using System.ComponentModel;
using System.Text.Json.Serialization;

namespace molilian.core.PushDataReport;
public class Response
{
    public int code { get; set; } = 0;
    public string message { get; set; } = string.Empty;
    public string requestId { get; set; } = string.Empty;
}

[Table("push_data_report")]
public class PushDataReportDTO
{
    /// <summary>
    /// 主键ID
    /// </summary>
    [JsonIgnore]
    [Key]
    public long id { get; set; }

    /// <summary>
    /// 报告日期
    /// </summary>

    [JsonPropertyName("datetime")]
    [JsonConverter(typeof(YunhuiKit.DateOnlyConverter))] // 自定义日期转换器
    public DateTime report_date { get; set; } = DateTime.Now.Date;

    /// <summary>
    /// 是否结算数据
    /// </summary>
    [JsonPropertyName("settlement")]
    public bool is_settlement { get; set; } = false;

    /// <summary>
    /// 投放场景
    /// </summary>
    public int type { get; set; } = 1;


    /// <summary>
    /// 子场景
    /// </summary>
    /// </summary>
    [JsonPropertyName("subType")]
    public int sub_type { get; set; } = 100000;

    /// <summary>
    /// 平台
    /// </summary>
    public int platform { get; set; } = 0;

    [JsonIgnore]
    [JsonPropertyName("platformName")]
    public string platform_name { get; set; } = string.Empty;

    /// <summary>
    /// 分销类型(0:未知,1:商品,2:直播,3:视频等)
    /// </summary>
    public int distribution { get; set; } = 0;

    /// <summary>
    /// 请求量
    /// </summary>
    [JsonConverter(typeof(YunhuiKit.LongToStringConverter))]
    [JsonPropertyName("reqCount")]
    public long req_count { get; set; } = 0;

    /// <summary>
    /// DP转链成功数
    /// </summary>
    [JsonConverter(typeof(YunhuiKit.LongToStringConverter))]
    [JsonPropertyName("dpTransitionSuccCount")]
    public long dp_transition_succ_count { get; set; } = 0;

    /// <summary>
    /// 商业转链成功数
    /// </summary>
    [JsonConverter(typeof(YunhuiKit.LongToStringConverter))]
    [JsonPropertyName("transitionSuccCount")]
    public long transition_succ_count { get; set; } = 0;

    /// <summary>
    /// 曝光PV
    /// </summary>
    [JsonConverter(typeof(YunhuiKit.LongToStringConverter))]
    [JsonPropertyName("exposeCount")]
    public long expose_count { get; set; } = 0;

    /// <summary>
    /// 曝光UV
    /// </summary>
    [JsonConverter(typeof(YunhuiKit.LongToStringConverter))]
    [JsonPropertyName("exposeUserCount")]
    public long expose_user_count { get; set; } = 0;

    /// <summary>
    /// 点击PV
    /// </summary>  
    [JsonConverter(typeof(YunhuiKit.LongToStringConverter))]
    [JsonPropertyName("clickCount")]
    public long click_count { get; set; } = 0;

    /// <summary>
    /// 点击UV
    /// </summary>
    [JsonConverter(typeof(YunhuiKit.LongToStringConverter))]
    [JsonPropertyName("clickUserCount")]
    public long click_user_count { get; set; } = 0;

    /// <summary>
    /// 唤端PV
    /// </summary>
    [JsonConverter(typeof(YunhuiKit.LongToStringConverter))]
    [JsonPropertyName("appOpenCount")]
    public long app_open_count { get; set; } = 0;

    /// <summary>
    /// 唤端UV
    /// </summary>
    [JsonConverter(typeof(YunhuiKit.LongToStringConverter))]
    [JsonPropertyName("appOpenUserCount")]
    public long app_open_user_count { get; set; } = 0;

    /// <summary>
    /// 订单PV
    /// </summary>
    [JsonConverter(typeof(YunhuiKit.LongToStringConverter))]
    [JsonPropertyName("orderCount")]
    public long order_count { get; set; } = 0;

    /// <summary>
    /// 订单UV
    /// </summary>
    [JsonConverter(typeof(YunhuiKit.LongToStringConverter))]
    [JsonPropertyName("orderUserCount")]
    public long order_user_count { get; set; } = 0;

    /// <summary>
    /// GMV(元)
    /// </summary>
    [JsonConverter(typeof(YunhuiKit.DecimalToStringConverter))]
    public decimal Gmv { get; set; } = 0;

    /// <summary>
    /// 预估收入(元)
    /// </summary>
    [JsonConverter(typeof(YunhuiKit.DecimalToStringConverter))]
    public decimal income { get; set; } = 0;

    /// <summary>
    /// 请求唯一标识
    /// </summary> 
    [JsonPropertyName("requestId")]
    public string request_id { get; set; } = string.Empty;

    /// <summary>
    /// 创建时间
    /// </summary>
    [JsonIgnore]
    public DateTime create_time { get; set; } = DateTime.Now;

    /// <summary>
    /// 更新时间
    /// </summary>
    [JsonIgnore]
    public DateTime update_time { get; set; } = DateTime.Now;

    /// <summary>
    /// 最后推送时间
    /// </summary>
    [JsonIgnore]
    public DateTime last_push_time { get; set; } = DateTime.Now;
    [JsonIgnore]
    public int status { get; set; } = 0;

    public string adzoneId { get; set; } = string.Empty;

    public string adId { get; set; } = string.Empty;
    



}
