package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 巨量引擎点击监测日志表
 *
 * @author system
 * @since 2025-06-25
 */
@Data
@JsonInclude
@TableName("ocean_engine_click_monitor_log")
@ApiModel(value = "OceanEngineClickMonitorLog对象", description = "巨量引擎点击监测日志表")
public class OceanEngineClickMonitorLog implements Serializable {

    private static final long serialVersionUID = 1L;

    /** bind_status：未绑定 */
    public static final int BIND_STATUS_UNBOUND = 0;
    /** bind_status：已绑定 */
    public static final int BIND_STATUS_BOUND = 1;
    /** bind_status：绑定失败 */
    public static final int BIND_STATUS_FAILED = 2;

    /** ad_version：巨量广告 1.0 */
    public static final int AD_VERSION_V1 = 1;
    /** ad_version：巨量广告 2.0 */
    public static final int AD_VERSION_V2 = 2;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "点击唯一标识")
    @TableField("click_id")
    private String clickId;

    @ApiModelProperty(value = "归因回调参数")
    @TableField("callback_param")
    private String callbackParam;

    @ApiModelProperty(value = "请求下发ID")
    @TableField("request_id")
    private String requestId;

    @ApiModelProperty(value = "广告主账户ID")
    @TableField("advertiser_id")
    private String advertiserId;

    @ApiModelProperty(value = "广告版本：1-1.0, 2-2.0")
    @TableField("ad_version")
    private Integer adVersion;

    @ApiModelProperty(value = "广告组ID(1.0)")
    @TableField("campaign_id")
    private String campaignId;

    @ApiModelProperty(value = "广告计划ID(1.0)")
    @TableField("aid")
    private String aid;

    @ApiModelProperty(value = "广告创意ID(1.0)")
    @TableField("cid")
    private String cid;

    @ApiModelProperty(value = "项目ID(2.0)")
    @TableField("project_id")
    private String projectId;

    @ApiModelProperty(value = "广告ID(2.0)")
    @TableField("promotion_id")
    private String promotionId;

    @ApiModelProperty(value = "转化目标ID")
    @TableField("convert_id")
    private String convertId;

    @ApiModelProperty(value = "广告投放位置")
    @TableField("csite")
    private String csite;

    @ApiModelProperty(value = "联盟站点")
    @TableField("union_site")
    private String unionSite;

    @ApiModelProperty(value = "图片素材ID")
    @TableField("mid1")
    private String mid1;

    @ApiModelProperty(value = "标题素材ID")
    @TableField("mid2")
    private String mid2;

    @ApiModelProperty(value = "视频素材ID")
    @TableField("mid3")
    private String mid3;

    @ApiModelProperty(value = "试玩素材ID")
    @TableField("mid4")
    private String mid4;

    @ApiModelProperty(value = "落地页素材ID")
    @TableField("mid5")
    private String mid5;

    @ApiModelProperty(value = "安卓下载详情页ID")
    @TableField("mid6")
    private String mid6;

    @ApiModelProperty(value = "点击时间戳(秒)")
    @TableField("click_ts")
    private Long clickTs;

    @ApiModelProperty(value = "点击时间戳(毫秒)")
    @TableField("click_ts_ms")
    private Long clickTsMs;

    @ApiModelProperty(value = "客户端IP")
    @TableField("client_ip")
    private String clientIp;

    @ApiModelProperty(value = "IPv4")
    @TableField("client_ipv4")
    private String clientIpv4;

    @ApiModelProperty(value = "IPv6")
    @TableField("client_ipv6")
    private String clientIpv6;

    @ApiModelProperty(value = "User-Agent")
    @TableField("user_agent")
    private String userAgent;

    @ApiModelProperty(value = "操作系统")
    @TableField("os_type")
    private String osType;

    @ApiModelProperty(value = "设备型号")
    @TableField("device_model")
    private String deviceModel;

    @ApiModelProperty(value = "iOS设备标识")
    @TableField("idfa")
    private String idfa;

    @ApiModelProperty(value = "Android IMEI")
    @TableField("imei")
    private String imei;

    @ApiModelProperty(value = "Android OAID")
    @TableField("oaid")
    private String oaid;

    @ApiModelProperty(value = "OAID MD5")
    @TableField("oaid_md5")
    private String oaidMd5;

    @ApiModelProperty(value = "Android ID")
    @TableField("android_id")
    private String androidId;

    @ApiModelProperty(value = "关联用户ID")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty(value = "关联门店ID")
    @TableField("store_id")
    private Integer storeId;

    @ApiModelProperty(value = "绑定状态：0-未绑定, 1-已绑定, 2-绑定失败")
    @TableField("bind_status")
    private Integer bindStatus;

    @ApiModelProperty(value = "绑定时间")
    @TableField("bind_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date bindTime;

    @ApiModelProperty(value = "实际收到的完整监测URL")
    @TableField("monitor_url")
    private String monitorUrl;

    @ApiModelProperty(value = "原始Query参数JSON")
    @TableField("raw_params")
    private String rawParams;

    @ApiModelProperty(value = "服务端接收请求来源IP")
    @TableField("server_ip")
    private String serverIp;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;
}
