package cn.xunqiu.task.omni.model.adstarget;
import cn.xunqiu.task.omni.model.adscreativity.vo.Groups;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import javax.validation.constraints.*;
import java.io.Serializable;
/**
* 定向vo对象.
*
* @author 80166776
*
* 2018年6月19日
*/
public class AdsTargetVo extends TargetBaseVo implements Serializable {
private static final long serialVersionUID = -5666109994277945430L;
private Long targetId; // 定向编号
private Long openTargetId; // 第三方定向编号
private String openV2TargetId; // 第三方定向id
private String ownerId; // 广告主
@NotNull(groups = { Groups.Edit.class, Groups.Add.class })
@Size(min = 0, max = 30, groups = { Groups.Edit.class, Groups.Add.class })
@Pattern(groups = { Groups.Add.class,
Groups.Edit.class }, regexp = "(^[A-Za-z0-9\u4e00-\u9fa5!@#¥%……*~|!@#$^《》? ,。:;【】”“()——\\[\\]、{}·&()-_+=,.;:'\"<>/]*$)|(^$)")
private String targetName; // 定向名称
@NotNull(groups = { Groups.Edit.class, Groups.Add.class })
@Size(min = 0, max = 100, groups = { Groups.Edit.class, Groups.Add.class })
@Pattern(groups = { Groups.Add.class,
Groups.Edit.class }, regexp = "(^[A-Za-z0-9\u4e00-\u9fa5!@#¥%……*~|!@#$^《》?,。:;【】”“()——\\[\\]、{}·&()-_+=,.;:'\"<>/]*$)|(^$)")
private String targetDesc; // 定向描述
@Range(min = 0, max = 1, groups = { Groups.Edit.class })
private int delStatus; // 删除状态:0, 正常;1,删除.
private Integer createTime; // 创建时间
private Integer updateTime; // 修改时间
@Pattern(groups = { Groups.Add.class, Groups.Edit.class, Groups.Query.class }, regexp = "^\\d{1,5}(?:,\\d{1,5}){0,500}|(^$)")
private String region;// 地域
@Pattern(groups = { Groups.Add.class, Groups.Edit.class, Groups.Query.class }, regexp = "^\\d{1,5}(?:,\\d{1,5}){0,500}|(^$)")
private String brandRegion;// 品牌当前地定向
@Pattern(groups = { Groups.Add.class, Groups.Edit.class }, regexp = "^\\d+(,\\d+)*|(^$)")
private String appCatActive;// app分类活跃
@Pattern(groups = { Groups.Add.class, Groups.Edit.class }, regexp = "^-?\\d+(,-?\\d+)*|(^$)")
private String mobileModel;// 机型
@Pattern(groups = { Groups.Add.class, Groups.Edit.class, Groups.Query.class }, regexp = "[0-2]|999|(^$)")
private String sex;// 性别
@Pattern(groups = { Groups.Add.class, Groups.Edit.class, Groups.Query.class }, regexp = "^([0-6][,])*[0-6]|999|(^$)")
private String age;// 年龄段
@Pattern(groups = { Groups.Add.class,
Groups.Edit.class }, regexp = "^((WIFI|2G|3G|4G|5G|999)[,])*(WIFI|2G|3G|4G|5G|999)$|(^$)")
private String network;// 网络
@Pattern(groups = { Groups.Add.class, Groups.Edit.class }, regexp = "^([1-4][,])*[1-4]|999|(^$)")
private String mobilePrice;// 机型价格
@Pattern(groups = { Groups.Add.class, Groups.Edit.class }, regexp = "^\\d+(,\\d+)*|(^$)")
private String installAppList;// 应用已安装
@Pattern(groups = { Groups.Add.class, Groups.Edit.class }, regexp = "^\\d+(,\\d+)*|(^$)")
private String preInstallAppList;// 应用预安装
@Pattern(groups = { Groups.Add.class, Groups.Edit.class }, regexp = "^\\d+(,\\d+)*|(^$)")
private String unPreInstallAppList;// 应用非预安装
@Pattern(groups = { Groups.Add.class, Groups.Edit.class }, regexp = "^\\d+(,\\d+)*|(^$)")
private String notInstallAppList;// 应用未安装
@Pattern(groups = { Groups.Add.class, Groups.Edit.class }, regexp = "^\\d{1,6}(?:,\\d{1,6}){0,500}|(^$)")
private String permanentRegion;// 常驻地
@Pattern(groups = { Groups.Add.class, Groups.Edit.class }, regexp = "^\\d+(,\\d+)*(\\|\\d+)*|(^$)")
private String appActive;// 应用活跃
@Pattern(groups = { Groups.Add.class, Groups.Edit.class }, regexp = "^\\d+(,\\d+)*(\\|\\d+)*|(^$)")
private String appNotActive;// 应用非活跃
@Pattern(groups = { Groups.Add.class, Groups.Edit.class, Groups.Query.class }, regexp = "^\\d+(,\\d+)*|(^$)")
private String interestTags;// 兴趣标签
@Pattern(groups = { Groups.Add.class, Groups.Edit.class, Groups.Query.class }, regexp = "^\\d+(,\\d+)*|(^$)")
private String interestTagsV2;// 兴趣标签新版本
@Pattern(groups = { Groups.Add.class, Groups.Edit.class, Groups.Query.class }, regexp = "^\\d+(,\\d+)*|(^$)")
private String tagsSystemRecommend;// 标签系统推荐
@Pattern(groups = { Groups.Add.class, Groups.Edit.class }, regexp = "^\\d+(,\\d+)*|^(([A-Za-z0-9])+:[0-9])(,([A-Za-z0-9])+:[0-9])*|(^$)")
private String unionAppId;// 联盟AppId
@Pattern(groups = { Groups.Add.class, Groups.Edit.class }, regexp = "^\\d+(,\\d+)*|^(([A-Za-z0-9])+:[0-9])(,([A-Za-z0-9])+:[0-9])*|(^$)")
private String unionAppIdRe;// 联盟App反向
@Pattern(groups = { Groups.Add.class, Groups.Edit.class }, regexp = "^\\d+(,\\d+)*|(^$)")
private String flowAppCatActive;// 流量类别
@Min(value = 0, groups = { Groups.Add.class, Groups.Edit.class })
@Max(value = 1, groups = { Groups.Add.class, Groups.Edit.class })
private int immutable;// 是否可以修改.默认0-可修改
@Min(groups = { Groups.Add.class, Groups.Edit.class }, value = 1)
@Max(groups = { Groups.Add.class, Groups.Edit.class }, value = 11)
private int type;// 定向类型,参考-TargetTypeEnum
private String audience;// 人群定向属性
private String oppAudience;//逆向定向人群(排除)
private Long pTargetId;// 父类定向id,继承该父类的定向属性.
private Long oppAudienceId;//逆向定向人群(排除)ID
private Integer appActiveDays;// 应用活跃天数.
private Integer appNotActiveDays;// 应用非活跃天数.
private Long audienceCount;// 人群包受众数量
@Min(groups = { Groups.Add.class, Groups.Edit.class }, value = 1)
@Max(groups = { Groups.Add.class, Groups.Edit.class }, value = 2)
private Integer version;// 1-原始版本.2-V2
private Integer lookalikeTaskId;// lookalike任务ID.
private Integer deleteSeed;// 删除种子包.0-不删除.1-删除.
private Integer expansionStatus;// 拓展状态.0-默认.1-待拓展.2-拓展中.3-拓展完成.4-拓展失败
private Long expansionCount;// 拓展数量.
@Length(max = 64)
private String seedFileName;// imei原文件名.
private Integer showStatus;// 展示状态.1-可使用,2-拓展中,3-拓展异常,4-已删除
// @Pattern(groups = { Groups.Add.class, Groups.Edit.class }, regexp =
// "[0-9]{1}|[1-9]{1}[0-9]{1}|1[0-7]{1}[0-9]|180|999|(^$)")
private String longitude;// 经度
// @Pattern(groups = { Groups.Add.class, Groups.Edit.class }, regexp =
// "[0-9]{1}|[1-8]{1}[0-9]{1}|90|999|(^$)")
private String latitude;// 纬度
// @Min(value = 3000, groups = { Groups.Add.class, Groups.Edit.class })
// @Max(value = 15000, groups = { Groups.Add.class, Groups.Edit.class })
// @Pattern(groups = { Groups.Add.class, Groups.Edit.class }, regexp =
// "[3-9]{1}[0-9]{3}|1[0-4]{1}[0-9]{3}|15000|999|(^$)")
private Long radius;// 半径.
private String locationName;// 地点名称.
private String address;// 地址
private String mapLocations;// 地图点
@Range(groups = { Groups.Add.class}, max = 4, min = 0)
private Integer imeiType; // imei类型
private String yesterdayInstalledApp;// 前一天已安装
private Long sizeLimit;//人群包大小限制
@Pattern(groups = { Groups.Add.class, Groups.Edit.class }, regexp = "^[A-Z]{2}(?:,[A-Z]{2}){0,500}|999|(^$)")
private String countryOrRegion;// 国家或地区
@Pattern(groups = { Groups.Add.class, Groups.Edit.class }, regexp = "^\\d{1,3}(?:,\\d{1,3}){0,10}|(^$)")
private String weatherCode;//天气定向:限制10种天气类型
@Pattern(groups = { Groups.Add.class, Groups.Edit.class }, regexp = "^\\d+(,\\d+)*|(^$)")
private String instantInstallList;// 快应用已添加
@Pattern