package com.neusoft.smart.pos.dto.advertisement.request;

import com.neusoft.smart.pos.dto.device.request.DeviceRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

@Data
@ApiModel
public class MediaResourceStrategyRequest {
	
	@NotNull(message = "广告策略名称不可为空")
	@ApiModelProperty(name = "strategyName", value = "广告策略名称", dataType = "String", example = "xxxxx", required = true)
	private String strategyName;
	
	@NotNull(message = "广告资源缓存时间不可为空")
	@ApiModelProperty(name = "macAddr", value = "广告资源缓存时间", dataType = "Long", example = "123", required = true)
	private Long cacheTime;
	
	@NotNull(message = "机具列表不可为空")
	@ApiModelProperty(name = "deviceList", value = "机具列表", dataType = "java.util.List", required = true)
	private List<DeviceRequest> deviceList;
	
	@NotNull(message = "资源列表不可为空")
	@ApiModelProperty(name = "strategyList", value = "资源列表", dataType = "java.util.List",  required = true)
	private List<MediaStrategyRequest> strategyList;
	
	
//	public static void main(String[] args) {
//		MediaResourceStrategyRequest request = new MediaResourceStrategyRequest();
//		request.setDeviceList(new ArrayList<>());
//		request.getDeviceList().add(new DeviceRequest());
//		request.setStrategyList(new ArrayList<>());
//		request.getStrategyList().add(new MediaStrategyRequest());
//		System.out.println(JSON.toJSONString(request, SerializerFeature.PrettyFormat,SerializerFeature.WriteMapNullValue));
//	}
}
