package com.sptg.statistics.api.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * title: StatisticsAdPush
 * package: com.sptg.statistics.api.entity
 * description:广告发布统计
 *
 *                
 *                 
 */
@Getter
@Setter
@TableName(value = "statistics_ad_push")
public class StatisticsAdPush {

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

    /**
     * 广告发布任务id
     */
    @TableField(value = "l_ad_push_task_id")
    private Long  adPushTaskId;

    /**
     * 任务类型：{ 1：人脸广告，2：闲时广告 }
     */
    @TableField(value = "i_task_type")
    private Integer  taskType;

    /**
     * 广告id
     */
    @TableField(value = "l_ad_content_id")
    private Long  adContentId;

    /**
     * 广告开始播放时间
     */
    @TableField(value = "t_ad_begin_date")
    private Date adBeginDate;

    /**
     * 广告结束播放时间
     */
    @TableField(value = "t_ad_end_date")
    private Date adEndDate;

    /**
     * 设备序列号
     */
    @TableField(value = "s_device_serial_number")
    private String  deviceSerialNumber;

    /**
     * 设备安装位置
     */
    @TableField(value = "s_device_install_path")
    private String  deviceInstallPath;

    /**
     * 省(id)
     */
    @TableField(value = "s_device_region_province")
    private String  deviceRegionProvince;

    /**
     * 市(id)
     */
    @TableField(value = "s_device_region_city")
    private String  deviceRegionCity;

    /**
     * 区(id)
     */
    @TableField(value = "s_device_region_area")
    private String  deviceRegionArea;

    /**
     * 发布时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @TableField(value = "t_create_date")
    private Date createDate;

    /**
     * 设备所属根机构 l_root_org_id
     */
    @TableField(value = "l_root_org_id")
    private Long rootOrgId;

    /**
     * 设备存储位置
     */
    @TableField(value = "s_org_position")
    private String orgPosition;

    /*-----------------------------------------------------------------------------------------------------*/

    /**
     * 广告发布条数(跟投放不同) 存储发布时的广告条件
     */
    @TableField(exist=false)
    private int adPushCount;
}
