package com.kiisoo.ic.activity.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.kiisoo.ic.activity.entity.PmnActivityPromotionParam;
import com.kiisoo.ic.generalize.entity.PrivilageOrganizational;
import com.kiisoo.ic.store.entity.PoiStore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@ApiModel("活动实例")
public class ActivityInstanceVO implements Serializable {

    @ApiModelProperty(value = "活动实例ID,有就编辑无则新增")
    private Long id;

    @ApiModelProperty(value = "活动池ID", required = true)
    @NotNull(message = "请输入活动池ID")
    private Long scheduleId;

    @ApiModelProperty(value = "活动池信息", hidden = true)
    private ActivityScheduleVO scheduleVO;

    @ApiModelProperty(value = "类型CODE", hidden = true)
    private String categoryCode;


    @ApiModelProperty(value = "活动名称", required = true)
    @NotBlank(message = "请输入活动名称")
    private String name;

    @ApiModelProperty(value = "活动开始日期", required = true)
    @NotNull(message = "请输入活动开始日期")
    @JsonFormat(pattern="yyyy-MM-dd", timezone = "GMT+8")
    private Date beginTime;

    @ApiModelProperty(value = "活动结束日期", required = true)
    @NotNull(message = "请输入活动结束日期")
    @JsonFormat(pattern="yyyy-MM-dd", timezone = "GMT+8")
    private Date endTime;

    private String content;

    @ApiModelProperty(value = "活动类型，多选项", required = true)
    @NotNull(message = "请选择活动类型")
    @Size(min = 1, message = "请选择活动类型")
    private List<PmnActivityPromotionParam> params;

    @ApiModelProperty(value = "选择的企业列表", required = true)
//    @NotNull(message = "请选择企业列表")
//    @Size(min = 1, message = "请选择企业列表")
    private List<PrivilageOrganizational> organizations;

    @ApiModelProperty(value = "第一个店铺名", hidden = true)
    private String storeName;
    @ApiModelProperty(value = "所有店铺数", hidden = true)
    private String storeCount;

    @ApiModelProperty(value = "创建时间", hidden = true)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "更新时间", hidden = true)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @ApiModelProperty(value = "第一个公司名", hidden = true)
    private String companyName;
    @ApiModelProperty(value = "所有公司数", hidden = true)
    private String companyCount;


    @ApiModelProperty(value = "选择的店铺列表", required = true)
    @NotNull(message = "请选择店铺列表")
    @Size(min = 1, message = "请选择店铺列表")
    private List<PoiStore> stores; // 店铺列表

    @ApiModelProperty(value = "状态", hidden = true)
    private int status;
    /*
     *分页总条数
     */
    @ApiModelProperty(value = "分页总条数", hidden = true)
    private long totalSize;

    /**序号*/
    @ApiModelProperty(value = "序号", hidden = true)
    private int number;
}
